Skip to content

Commit

Permalink
fix: format result
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
  • Loading branch information
vsukhin committed Aug 8, 2024
1 parent a605dfb commit 7b4c5d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ func printPrettyOutput(ui *ui.UI, execution testkube.TestWorkflowExecution) {
ui.Warn("Disabled webhooks: ", fmt.Sprint(execution.DisableWebhooks))
if len(execution.Tags) > 0 {
ui.NL()
ui.Warn("Tags: ", testkube.MapToString(execution.Tags))
ui.Warn("Tags: ", testkube.MapToString(execution.Tags))
}
if execution.Result != nil && execution.Result.Status != nil {
ui.Warn("Status: ", string(*execution.Result.Status))
if !execution.Result.QueuedAt.IsZero() {
ui.Warn("Queued at: ", execution.Result.QueuedAt.String())
ui.Warn("Queued at: ", execution.Result.QueuedAt.String())
}
if !execution.Result.StartedAt.IsZero() {
ui.Warn("Started at: ", execution.Result.StartedAt.String())
Expand Down
11 changes: 6 additions & 5 deletions pkg/testworkflows/testworkflowexecutor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,14 @@ func (e *executor) Execute(ctx context.Context, workflow testworkflowsv1.TestWor
var tags map[string]string
if workflow.Spec.Execution != nil {
tags = workflow.Spec.Execution.Tags
if request.Tags != nil {
if tags == nil {
tags = make(map[string]string)
}
}

maps.Copy(tags, request.Tags)
if request.Tags != nil {
if tags == nil {
tags = make(map[string]string)
}

maps.Copy(tags, request.Tags)
}

var tagsData string
Expand Down

0 comments on commit 7b4c5d2

Please sign in to comment.