Files
Havline/internal/nginx/certs_test.go
T

14 lines
337 B
Go
Raw Normal View History

2026-09-23 09:40:59 +08:00
package nginx
import "testing"
func TestHostCoveredByCert(t *testing.T) {
domains := []string{"example.com", "*.example.com"}
if !hostCoveredByCert("app.example.com", domains) {
t.Fatal("expected wildcard to cover subdomain")
}
if hostCoveredByCert("s.muksi.com", domains) {
t.Fatal("expected typo domain to be rejected")
}
}