Skip to content

Commit

Permalink
extend the message for no records present whil updating enforced cond…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
maksymvavilov committed Mar 27, 2024
1 parent 97df0e8 commit a32158c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/dnspolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ var _ = Describe("DNSPolicy controller", func() {
"Type": Equal(string(kuadrant.PolicyConditionEnforced)),
"Status": Equal(metav1.ConditionFalse),
"Reason": Equal(PolicyReasonUnknown),
"Message": Equal("DNSPolicy has encountered some issues: policy is not enforced on any dns record"),
"Message": Equal("DNSPolicy has encountered some issues: policy is not enforced on any dns record: no routes attached for listeners"),
})),
)
}, TestTimeoutMedium, time.Second).Should(Succeed())
Expand Down
2 changes: 1 addition & 1 deletion controllers/dnspolicy_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ func (r *DNSPolicyReconciler) enforcedCondition(ctx context.Context, dnsPolicy *
return kuadrant.EnforcedCondition(dnsPolicy, nil, true)
}
// there are no controlled DNS records present
return kuadrant.EnforcedCondition(dnsPolicy, kuadrant.NewErrUnknown(dnsPolicy.Kind(), errors.New("policy is not enforced on any dns record")), false)
return kuadrant.EnforcedCondition(dnsPolicy, kuadrant.NewErrUnknown(dnsPolicy.Kind(), errors.New("policy is not enforced on any dns record: no routes attached for listeners")), false)
}

0 comments on commit a32158c

Please sign in to comment.