Skip to content

Commit

Permalink
fix: add deprecated cli param
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Jul 11, 2024
1 parent bba8ead commit 46a10ae
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/kubectl-testkube/commands/tests/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ func AddCreateFlags(cmd *cobra.Command, flags *CreateCommonFlags) {
cmd.Flags().StringVar(&flags.SlavePodTemplate, "slave-pod-template", "", "slave pod template file path for extensions to slave pod template")
cmd.Flags().StringVar(&flags.SlavePodTemplateReference, "slave-pod-template-reference", "", "reference to slave pod template to use for the test")
cmd.Flags().StringVar(&flags.ExecutionNamespace, "execution-namespace", "", "namespace for test execution (Pro edition only)")
cmd.Flags().MarkDeprecated("disable-webhooks", "disable-webhooks is deprecated")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")
}

func validateExecutorTypeAndContent(executorType, contentType string, executors testkube.ExecutorsDetails) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/kubectl-testkube/commands/tests/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ func NewRunTestCmd() *cobra.Command {
cmd.Flags().StringVar(&debugFile, "debugger-file", "", "store debug info into file, stdout by default")
cmd.Flags().BoolVar(&attachDebugger, "attach-debugger", false, "attach simple debugger for job, need KUBECONFIG for the agent to be active")
cmd.Flags().BoolVar(&disableWebhooks, "disable-webhooks", false, "disable webhooks")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")

return cmd
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/kubectl-testkube/commands/testsuites/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ func NewCreateTestSuitesCmd() *cobra.Command {
cmd.Flags().StringVar(&scraperTemplateReference, "scraper-template-reference", "", "reference to scraper template to use for the test")
cmd.Flags().StringVar(&pvcTemplateReference, "pvc-template-reference", "", "reference to pvc template to use for the test")
cmd.Flags().BoolVar(&update, "update", false, "update, if test suite already exists")
cmd.Flags().MarkDeprecated("disable-webhooks", "disable-webhooks is deprecated")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")

return cmd
}
Expand Down
1 change: 1 addition & 0 deletions cmd/kubectl-testkube/commands/testsuites/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func NewRunTestSuiteCmd() *cobra.Command {
cmd.Flags().StringArrayVarP(&masks, "mask", "", []string{}, "regexp to filter downloaded files, single or comma separated, like report/.* or .*\\.json,.*\\.js$")
cmd.Flags().BoolVarP(&silentMode, "silent", "", false, "don't print intermediate test suite execution")
cmd.Flags().BoolVar(&disableWebhooks, "disable-webhooks", false, "disable webhooks")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")

return cmd
}
2 changes: 2 additions & 0 deletions cmd/kubectl-testkube/commands/testsuites/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func UpdateTestSuitesCmd() *cobra.Command {
cmd.Flags().StringVar(&cronJobTemplateReference, "cronjob-template-reference", "", "reference to cron job template to use for the test")
cmd.Flags().StringVar(&scraperTemplateReference, "scraper-template-reference", "", "reference to scraper template to use for the test")
cmd.Flags().StringVar(&pvcTemplateReference, "pvc-template-reference", "", "reference to pvc template to use for the test")
cmd.Flags().MarkDeprecated("disable-webhooks", "disable-webhooks is deprecated")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")

return cmd
}
1 change: 1 addition & 0 deletions cmd/kubectl-testkube/commands/testworkflows/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func NewCreateTestWorkflowCmd() *cobra.Command {
cmd.Flags().StringVar(&name, "name", "", "test workflow name")
cmd.Flags().BoolVar(&update, "update", false, "update, if test workflow already exists")
cmd.Flags().StringVarP(&filePath, "file", "f", "", "file path to get the test workflow specification")
cmd.Flags().MarkDeprecated("disable-webhooks", "disable-webhooks is deprecated")

return cmd
}
1 change: 1 addition & 0 deletions cmd/kubectl-testkube/commands/testworkflows/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func NewRunTestWorkflowCmd() *cobra.Command {
cmd.Flags().StringToStringVarP(&config, "config", "", map[string]string{}, "configuration variables in a form of name1=val1 passed to executor")
cmd.Flags().BoolVarP(&watchEnabled, "watch", "f", false, "watch for changes after start")
cmd.Flags().BoolVar(&disableWebhooks, "disable-webhooks", false, "disable webhooks for this execution")
cmd.Flags().MarkDeprecated("enable-webhooks", "enable-webhooks is deprecated")

return cmd
}
Expand Down

0 comments on commit 46a10ae

Please sign in to comment.