From 6b537c2ddd78cf3ce3a2f86774e56505c92186ea Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 9 Jul 2024 19:33:56 +0300 Subject: [PATCH] fix: show test workflow running context Signed-off-by: Vladislav Sukhin --- .../renderer/testworkflowexecution_obj.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cmd/kubectl-testkube/commands/testworkflows/renderer/testworkflowexecution_obj.go b/cmd/kubectl-testkube/commands/testworkflows/renderer/testworkflowexecution_obj.go index f0ba6c94163..2c7dc0274b5 100644 --- a/cmd/kubectl-testkube/commands/testworkflows/renderer/testworkflowexecution_obj.go +++ b/cmd/kubectl-testkube/commands/testworkflows/renderer/testworkflowexecution_obj.go @@ -60,8 +60,21 @@ func printPrettyOutput(ui *ui.UI, execution testkube.TestWorkflowExecution) { ui.Warn("Requested at: ", execution.ScheduledAt.String()) for _, ctx := range execution.RunningContext { ui.Warn("Running context: ") - ui.Warn("Type: ", string(*ctx.Interface_)) - ui.Warn("Context: ", string(*ctx.Actor)) + if ctx.Interface_ != nil { + ui.Warn("Type: ", string(*ctx.Interface_)) + } + if ctx.Actor != nil { + ui.Warn("Context: ", string(*ctx.Actor)) + } + if ctx.Caller != nil { + ui.Warn("Caller: ") + if ctx.Caller.CallerResourceType != nil { + ui.Warn("Resource type: ", string(*ctx.Caller.CallerResourceType)) + } + ui.Warn("Resource name: ", string(ctx.Caller.CallerResourceName)) + ui.Warn("Resource execution ID: ", string(ctx.Caller.CallerResourceExecutionID)) + ui.Warn("Full execution path: ", string(ctx.Caller.FullExecutionPath)) + } } if execution.Result != nil && execution.Result.Status != nil { ui.Warn("Status: ", string(*execution.Result.Status))