modify DNS-1123 error messages to indicate that RFC 1123 is not followed exactly

This commit is contained in:
Matthew Fenwick
2020-08-23 08:46:08 -04:00
parent 81bf1f8789
commit d407129cf7
23 changed files with 44 additions and 44 deletions

View File

@@ -693,7 +693,7 @@ func TestValidateValidatingWebhookConfiguration(t *testing.T) {
SideEffects: &unknownSideEffect,
},
}, true),
expectedError: `clientConfig.service.path: Invalid value: "/apis/foo.bar/v1alpha1/--bad": segment[3]: a DNS-1123 subdomain`,
expectedError: `clientConfig.service.path: Invalid value: "/apis/foo.bar/v1alpha1/--bad": segment[3]: a lowercase RFC 1123 subdomain`,
},
{
name: "invalid port 0",
@@ -1662,7 +1662,7 @@ func TestValidateMutatingWebhookConfiguration(t *testing.T) {
SideEffects: &unknownSideEffect,
},
}, true),
expectedError: `clientConfig.service.path: Invalid value: "/apis/foo.bar/v1alpha1/--bad": segment[3]: a DNS-1123 subdomain`,
expectedError: `clientConfig.service.path: Invalid value: "/apis/foo.bar/v1alpha1/--bad": segment[3]: a lowercase RFC 1123 subdomain`,
},
{
name: "invalid port 0",