Skip to content

Commit 519b736

Browse files
author
Kate Osborn
committed
Code review
1 parent 18f8c53 commit 519b736

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/suite/client_settings_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import (
2121
"github.com/nginxinc/nginx-gateway-fabric/tests/framework"
2222
)
2323

24+
const (
25+
conditionTypeAccepted = "Accepted"
26+
)
27+
2428
var _ = Describe("ClientSettingsPolicy", Ordered, Label("functional", "cspolicy"), func() {
2529
var (
2630
files = []string{
@@ -177,7 +181,7 @@ var _ = Describe("ClientSettingsPolicy", Ordered, Label("functional", "cspolicy"
177181
nsname := types.NamespacedName{Name: name, Namespace: namespace}
178182

179183
err := waitForCSPolicyToBeAccepted(nsname)
180-
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("%s was not marked as conflicted", name))
184+
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("%s was not accepted", name))
181185
}
182186

183187
Expect(resourceManager.DeleteFromFiles(policies, namespace)).To(Succeed())
@@ -282,7 +286,7 @@ func ancestorStatusMustHaveAcceptedCondition(
282286
return fmt.Errorf("expected 1 condition in status, got %d", len(status.Conditions))
283287
}
284288

285-
if status.Conditions[0].Type != "Accepted" {
289+
if status.Conditions[0].Type != conditionTypeAccepted {
286290
return fmt.Errorf("expected condition type to be Accepted, got %s", status.Conditions[0].Type)
287291
}
288292

@@ -291,7 +295,7 @@ func ancestorStatusMustHaveAcceptedCondition(
291295
}
292296

293297
if status.Conditions[0].Reason != string(condReason) {
294-
return fmt.Errorf("expected condition status to be %s, got %s", condReason, status.Conditions[0].Reason)
298+
return fmt.Errorf("expected condition reason to be %s, got %s", condReason, status.Conditions[0].Reason)
295299
}
296300

297301
return nil

0 commit comments

Comments
 (0)