diff --git a/cmd/gateway_validate.go b/cmd/gateway_validate.go index 2625d9284..e3dca9ec5 100644 --- a/cmd/gateway_validate.go +++ b/cmd/gateway_validate.go @@ -226,7 +226,7 @@ this command unless --online flag is used. sort.Strings(listOfKeys) return fmt.Errorf( - "invalid value '%s' for --check-online-plugins-only; it should be a valid Kong entity. "+ + "invalid value '%s' for --online-entities-list; it should be a valid Kong entity (case-sensitive). "+ "Valid entities: %v", value, listOfKeys, ) @@ -260,7 +260,7 @@ this command unless --online flag is used. validateCmd.Flags().BoolVar(&validateCmdRBACResourcesOnly, "rbac-resources-only", false, "indicate that the state file(s) contains RBAC resources only (Kong Enterprise only).") validateCmd.Flags().StringSliceVarP(&validateCmdOnlineEntitiesFilter, "online-entities-list", - "", []string{}, "indicate the list of entitied that should be validate online validation.") + "", []string{}, "indicate the list of entities that should be validated online validation.") if deprecated { validateCmd.Flags().StringSliceVarP(&validateCmdKongStateFile, "state", "s", []string{"kong.yaml"}, "file(s) containing Kong's configuration.\n"+ diff --git a/tests/integration/validate_test.go b/tests/integration/validate_test.go index 03051e040..95a65c472 100644 --- a/tests/integration/validate_test.go +++ b/tests/integration/validate_test.go @@ -81,10 +81,10 @@ func Test_Validate_Konnect(t *testing.T) { stateFile: "testdata/validate/kong3x.yaml", additionalArgs: []string{"--online-entities-list=services,Routes,Plugins"}, errorExpected: true, - errorString: "invalid value 'services' for --check-online-plugins-only; it should be a valid " + - "Kong entity. Valid entities: [ACLGroups BasicAuths CACertificates Certificates Consumers Documents " + - "FilterChains HMACAuths JWTAuths KeyAuths Oauth2Creds Plugins RBACEndpointPermissions RBACRoles Routes " + - "SNIs Services Targets Upstreams Vaults]", + errorString: "invalid value 'services' for --online-entities-list; it should be a valid " + + "Kong entity (case-sensitive). Valid entities: [ACLGroups BasicAuths CACertificates Certificates Consumers " + + "Documents FilterChains HMACAuths JWTAuths KeyAuths Oauth2Creds Plugins RBACEndpointPermissions RBACRoles " + + "Routes SNIs Services Targets Upstreams Vaults]", }, { name: "validate with correct online list, passed via --online-entities-list cli flag",