Skip to content

Commit

Permalink
fix err msg
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJac committed Dec 5, 2024
1 parent 1358190 commit 3669938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/gateway_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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"+
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3669938

Please sign in to comment.