Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/cmd/pipelinerun/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func TestPipelineRunDelete_v1beta1(t *testing.T) {
input: seeds[15].pipelineClient,
inputStream: nil,
wantError: false,
want: "NAME STARTED DURATION STATUS\npipeline-run-4 --- --- ---\npipeline-run-5 --- --- Succeeded(PipelineRunPending)\npipeline-run-6 0 seconds ago --- Succeeded(Running)\npipeline-run-7 0 seconds ago --- Running(PipelineRunPending)\n",
want: "NAME STARTED DURATION STATUS\npipeline-run-4 --- --- ---\npipeline-run-5 --- --- Pending\npipeline-run-6 0 seconds ago --- Succeeded(Running)\npipeline-run-7 0 seconds ago --- Pending\n",
},
}

Expand Down Expand Up @@ -1267,7 +1267,7 @@ func TestPipelineRunDelete(t *testing.T) {
input: seeds[15].pipelineClient,
inputStream: nil,
wantError: false,
want: "NAME STARTED DURATION STATUS\npipeline-run-4 --- --- ---\npipeline-run-5 --- --- Succeeded(PipelineRunPending)\npipeline-run-6 0 seconds ago --- Succeeded(Running)\npipeline-run-7 0 seconds ago --- Running(PipelineRunPending)\n",
want: "NAME STARTED DURATION STATUS\npipeline-run-4 --- --- ---\npipeline-run-5 --- --- Pending\npipeline-run-6 0 seconds ago --- Succeeded(Running)\npipeline-run-7 0 seconds ago --- Pending\n",
},
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/formatted/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var ConditionColor = map[string]color.Attribute{
"Running": color.FgHiBlue,
"Cancelled": color.FgHiYellow,
"Completed": color.FgHiMagenta,
"Pending": color.FgHiBlue,
"Pending": color.FgHiYellow,
"Started": color.FgHiCyan,
}

Expand Down Expand Up @@ -86,6 +86,8 @@ func Condition(c v1.Conditions) string {
return ColorStatus("Pending")
}
return ColorStatus("Pending") + "(" + c[0].Reason + ")"
case "PipelineRunPending":
return ColorStatus("Pending")
default:
return ColorStatus(status) + "(" + c[0].Reason + ")"
}
Expand Down
9 changes: 9 additions & 0 deletions pkg/formatted/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ func TestCondition(t *testing.T) {
}},
want: "Succeeded",
},
{
name: "PipelineRunPending status reason",
condition: []apis.Condition{{
Type: apis.ConditionSucceeded,
Status: corev1.ConditionTrue,
Reason: "PipelineRunPending",
}},
want: "Pending",
},
{
name: "PipelineRunCanceled status reason",
condition: []apis.Condition{{
Expand Down