Skip to content

Commit

Permalink
Merge pull request #11498 from fabriziopandini/refine-v1beta2-summary
Browse files Browse the repository at this point in the history
🌱 Refine v1beta2 summary
  • Loading branch information
k8s-ci-robot authored Nov 28, 2024
2 parents dd60d29 + ae9ae4e commit 93b4aac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion util/conditions/v1beta2/merge_strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func (d *defaultMergeStrategy) Merge(conditions []ConditionWithOwnerInfo, condit
if condition.Message != "" {
m += indentIfMultiline(condition.Message)
} else {
m += " No additional info provided"
m += fmt.Sprintf(" %s", condition.Reason)
}
messages = append(messages, m)
}
Expand Down
6 changes: 3 additions & 3 deletions util/conditions/v1beta2/summary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func TestSummary(t *testing.T) {
options: []SummaryOption{ForConditionTypes{"A", "B", "!C"}, NegativePolarityConditionTypes{"!C"}},
want: &metav1.Condition{
Type: clusterv1.AvailableV1Beta2Condition,
Status: metav1.ConditionFalse, // False because there is one issue
Reason: issuesReportedReason, // Using a generic reason
Message: "* !C: No additional info provided", // messages from all the issues & unknown conditions (info dropped); since message is empty, a default one is added
Status: metav1.ConditionFalse, // False because there is one issue
Reason: issuesReportedReason, // Using a generic reason
Message: "* !C: Reason-!C", // messages from all the issues & unknown conditions (info dropped); since message is empty, a default one is added
},
},
{
Expand Down

0 comments on commit 93b4aac

Please sign in to comment.