Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Jul 27, 2023
1 parent 0cfae33 commit 525f850
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/gateway_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ func newSyncCmd(deprecated bool) *cobra.Command {
execute := executeSync
argsValidator := cobra.MinimumNArgs(0)
preRun := func(cmd *cobra.Command, args []string) error {
diffCmdKongStateFile = args
if len(diffCmdKongStateFile) == 0 {
diffCmdKongStateFile = []string{"-"}
syncCmdKongStateFile = args
if len(syncCmdKongStateFile) == 0 {
syncCmdKongStateFile = []string{"-"}
}
return preRunSilenceEventsFlag()
}
Expand All @@ -45,7 +45,7 @@ func newSyncCmd(deprecated bool) *cobra.Command {
}
argsValidator = validateNoArgs
preRun = func(cmd *cobra.Command, args []string) error {
if len(diffCmdKongStateFile) == 0 {
if len(syncCmdKongStateFile) == 0 {
return fmt.Errorf("a state file with Kong's configuration " +
"must be specified using `-s`/`--state` flag")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gateway_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ and alerts if there are broken relationships, or missing links present.

if deprecated {
use = "validate"
short = "[deprecated] use 'gateway validate' instead"
short = "[deprecated] use 'gateway validate' or 'file validate' instead"
long = `The validate command reads the state file and ensures validity.
It reads all the specified state files and reports YAML/JSON
parsing issues. It also checks for foreign relationships
Expand Down

0 comments on commit 525f850

Please sign in to comment.