@@ -21,6 +21,10 @@ import (
21
21
"github.com/nginxinc/nginx-gateway-fabric/tests/framework"
22
22
)
23
23
24
+ const (
25
+ conditionTypeAccepted = "Accepted"
26
+ )
27
+
24
28
var _ = Describe ("ClientSettingsPolicy" , Ordered , Label ("functional" , "cspolicy" ), func () {
25
29
var (
26
30
files = []string {
@@ -177,7 +181,7 @@ var _ = Describe("ClientSettingsPolicy", Ordered, Label("functional", "cspolicy"
177
181
nsname := types.NamespacedName {Name : name , Namespace : namespace }
178
182
179
183
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 ))
181
185
}
182
186
183
187
Expect (resourceManager .DeleteFromFiles (policies , namespace )).To (Succeed ())
@@ -282,7 +286,7 @@ func ancestorStatusMustHaveAcceptedCondition(
282
286
return fmt .Errorf ("expected 1 condition in status, got %d" , len (status .Conditions ))
283
287
}
284
288
285
- if status .Conditions [0 ].Type != "Accepted" {
289
+ if status .Conditions [0 ].Type != conditionTypeAccepted {
286
290
return fmt .Errorf ("expected condition type to be Accepted, got %s" , status .Conditions [0 ].Type )
287
291
}
288
292
@@ -291,7 +295,7 @@ func ancestorStatusMustHaveAcceptedCondition(
291
295
}
292
296
293
297
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 )
295
299
}
296
300
297
301
return nil
0 commit comments