Skip to content

Commit 709072b

Browse files
committed
Update printing for ignored service pods.
1 parent 18a31f8 commit 709072b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/utils.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "github.com/xlab/treeprint"
2020

2121
const (
2222
TreeStatusDone = "✅"
23+
TreeStatusIgnored = "☑️"
2324
TreeStatusNotDone = "❌"
2425
TreeStatusUnknown = "❔"
2526
)

pkg/waitables.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (w *Waitables) getStatusTreeString() string {
178178
branch := namespace_branches[ns]
179179
for n, val := range nsitems {
180180
status := "Unavailable"
181-
if val.IsAvailable() {
181+
if (!w.onlyOnePerServiceRequired && val.IsAvailable()) || (w.onlyOnePerServiceRequired && val.IsAtLeastOneAvailable()) {
182182
status = "Available"
183183
}
184184
svc_branch := branch.AddMetaBranch(TreeStatusUnknown, fmt.Sprintf("service/%s: %s", n, status))
@@ -189,6 +189,9 @@ func (w *Waitables) getStatusTreeString() string {
189189
if pod.IsReady() {
190190
status = "Ready"
191191
meta = TreeStatusDone
192+
} else if w.onlyOnePerServiceRequired {
193+
status = "Ignored"
194+
meta = TreeStatusIgnored
192195
}
193196
svc_branch.AddMetaNode(meta, fmt.Sprintf("pod/%s: %s", podname, status))
194197
}

0 commit comments

Comments
 (0)