@@ -59,13 +59,13 @@ var _ = Describe("Ingress tests for OPA filters", func() {
59
59
60
60
url := "https://" + hostName + authorizationEnforcedPath
61
61
req , err := http .NewRequest ("GET" , url , nil )
62
- resp , err := getAndWaitResponse (rt , req , 10 * time .Second , http .StatusForbidden )
62
+ resp , err := getAndWaitResponseWithInterval (rt , req , 60 * time . Second , 5 * time .Second , http .StatusForbidden )
63
63
framework .ExpectNoError (err )
64
64
Expect (resp .StatusCode ).To (Equal (http .StatusForbidden ))
65
65
66
66
By (fmt .Sprintf ("Calling ingress %s/%s we wait to get a 200 with opaAuthorizeRequest %s policy" , ingressUpdate .Namespace , ingressUpdate .Name , opaPolicyName ))
67
67
req .Header .Set ("Authorization" , "Basic valid_token" ) // Authorized request
68
- resp , err = getAndWaitResponse (rt , req , 10 * time .Second , http .StatusOK )
68
+ resp , err = getAndWaitResponseWithInterval (rt , req , 60 * time . Second , 5 * time .Second , http .StatusOK )
69
69
framework .ExpectNoError (err )
70
70
Expect (resp .StatusCode ).To (Equal (http .StatusOK ))
71
71
s , err := getBody (resp )
@@ -91,13 +91,13 @@ var _ = Describe("Ingress tests for OPA filters", func() {
91
91
92
92
url := "https://" + hostName + serveResponsePath
93
93
req , err := http .NewRequest ("GET" , url , nil )
94
- resp , err := getAndWaitResponse (rt , req , 10 * time .Second , http .StatusForbidden )
94
+ resp , err := getAndWaitResponseWithInterval (rt , req , 60 * time . Second , 5 * time .Second , http .StatusForbidden )
95
95
framework .ExpectNoError (err )
96
96
Expect (resp .StatusCode ).To (Equal (http .StatusForbidden ))
97
97
98
98
By (fmt .Sprintf ("Calling ingress %s/%s we wait to get a 200 with opaServeResponse %s policy" , ingressUpdate .Namespace , ingressUpdate .Name , opaPolicyName ))
99
99
req .Header .Set ("Authorization" , "Basic permissions_token" ) // Authorized request
100
- resp , err = getAndWaitResponse (rt , req , 10 * time .Second , http .StatusOK )
100
+ resp , err = getAndWaitResponseWithInterval (rt , req , 60 * time . Second , 5 * time .Second , http .StatusOK )
101
101
framework .ExpectNoError (err )
102
102
Expect (resp .StatusCode ).To (Equal (http .StatusOK ))
103
103
s , err := getBody (resp )
@@ -147,7 +147,7 @@ func updateIngressAndWait(serviceName, hostName, path, ingressRoute string, port
147
147
)
148
148
ingressUpdate , err := cs .NetworkingV1 ().Ingresses (ingressCreate .ObjectMeta .Namespace ).Update (context .TODO (), updatedIng , metav1.UpdateOptions {})
149
149
framework .ExpectNoError (err )
150
- time .Sleep (4 * time .Minute ) // wait for routing change propagation
150
+ time .Sleep (2 * time .Minute ) // wait for routing change propagation
151
151
152
152
return ingressUpdate
153
153
}
0 commit comments