Skip to content

Commit

Permalink
fix: check cloud for executing test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Oct 22, 2024
1 parent 34ceae9 commit 17eb28b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/kubectl-testkube/commands/testworkflows/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ func NewRunTestWorkflowCmd() *cobra.Command {
ui.ExitOnError("loading config file", err)
ui.NL()

var runningContext *testkube.TestWorkflowRunningContext
// Pro edition only (tcl protected code)
if cfg.ContextType == testkubecfg.ContextTypeCloud {
runningContext = tclcmd.GetRunningContext(runContext, cfg.CloudContext.ApiKey, interfaceType)
}

execution, err := client.ExecuteTestWorkflow(name, testkube.TestWorkflowExecutionRequest{
Name: executionName,
Config: config,
DisableWebhooks: disableWebhooks,
Tags: tags,
// Pro edition only (tcl protected code)
RunningContext: tclcmd.GetRunningContext(runContext, cfg.CloudContext.ApiKey, interfaceType),
RunningContext: runningContext,
},
)
if err != nil {
Expand Down

0 comments on commit 17eb28b

Please sign in to comment.