mirror of https://github.com/kubernetes/kops.git
16 lines
302 B
Go
16 lines
302 B
Go
package api
|
|
|
|
import (
|
|
"k8s.io/kubernetes/pkg/util/validation"
|
|
"testing"
|
|
)
|
|
|
|
func Test_Validate_DNS(t *testing.T) {
|
|
for _, name := range []string{"test.-", "!", "-"} {
|
|
errs := validation.IsDNS1123Subdomain(name)
|
|
if len(errs) == 0 {
|
|
t.Fatalf("Expected errors validating name %q", name)
|
|
}
|
|
}
|
|
}
|