Skip to content

Commit

Permalink
Update printing for ignored service pods.
Browse files Browse the repository at this point in the history
  • Loading branch information
EraYaN committed Jan 8, 2024
1 parent 18a31f8 commit 709072b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "github.com/xlab/treeprint"

const (
TreeStatusDone = "✅"
TreeStatusIgnored = "☑️"
TreeStatusNotDone = "❌"
TreeStatusUnknown = "❔"
)
Expand Down
5 changes: 4 additions & 1 deletion pkg/waitables.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (w *Waitables) getStatusTreeString() string {
branch := namespace_branches[ns]
for n, val := range nsitems {
status := "Unavailable"
if val.IsAvailable() {
if (!w.onlyOnePerServiceRequired && val.IsAvailable()) || (w.onlyOnePerServiceRequired && val.IsAtLeastOneAvailable()) {
status = "Available"
}
svc_branch := branch.AddMetaBranch(TreeStatusUnknown, fmt.Sprintf("service/%s: %s", n, status))
Expand All @@ -189,6 +189,9 @@ func (w *Waitables) getStatusTreeString() string {
if pod.IsReady() {
status = "Ready"
meta = TreeStatusDone
} else if w.onlyOnePerServiceRequired {
status = "Ignored"
meta = TreeStatusIgnored
}
svc_branch.AddMetaNode(meta, fmt.Sprintf("pod/%s: %s", podname, status))
}
Expand Down

0 comments on commit 709072b

Please sign in to comment.