@@ -181,7 +181,7 @@ spec:
181181 })
182182
183183 Context ("Test Gateway with enabled GatewayProxy plugin" , func () {
184- FIt ("Should apply plugin configuration when enabled" , func () {
184+ It ("Should apply plugin configuration when enabled" , func () {
185185 By ("Create HTTPRoute for Gateway with GatewayProxy" )
186186 ResourceApplied ("HTTPRoute" , "test-route" , fmt .Sprintf (httpRouteForTest , "api7" ), 1 )
187187
@@ -193,11 +193,7 @@ spec:
193193 Status (200 )
194194
195195 resp .Header ("X-Proxy-Test" ).IsEqual ("enabled" )
196- })
197- })
198196
199- Context ("Test Gateway with disabled GatewayProxy plugin" , func () {
200- It ("Should not apply plugin configuration when disabled" , func () {
201197 By ("Update GatewayProxy with disabled plugin" )
202198 err := s .CreateResourceFromString (gatewayProxyWithDisabledPlugin )
203199 Expect (err ).NotTo (HaveOccurred (), "updating GatewayProxy with disabled plugin" )
@@ -207,18 +203,28 @@ spec:
207203 ResourceApplied ("HTTPRoute" , "test-route" , fmt .Sprintf (httpRouteForTest , "api7" ), 1 )
208204
209205 By ("Check if the plugin is not applied" )
210- resp : = s .NewAPISIXClient ().
206+ resp = s .NewAPISIXClient ().
211207 GET ("/get" ).
212208 WithHost ("example.com" ).
213209 Expect ().
214210 Status (200 )
215211
216212 resp .Header ("X-Proxy-Test" ).IsEmpty ()
217213 })
218- })
219214
220- Context ("Test Gateway without GatewayProxy" , func () {
221215 It ("Should work normally without GatewayProxy" , func () {
216+ By ("Create HTTPRoute for Gateway with GatewayProxy" )
217+ ResourceApplied ("HTTPRoute" , "test-route" , fmt .Sprintf (httpRouteForTest , "api7" ), 1 )
218+
219+ By ("Check if the plugin is applied" )
220+ resp := s .NewAPISIXClient ().
221+ GET ("/get" ).
222+ WithHost ("example.com" ).
223+ Expect ().
224+ Status (200 )
225+
226+ resp .Header ("X-Proxy-Test" ).IsEqual ("enabled" )
227+
222228 By ("Update Gateway without GatewayProxy" )
223229 err := s .CreateResourceFromString (fmt .Sprintf (gatewayWithoutProxy , gatewayClassName ))
224230 Expect (err ).NotTo (HaveOccurred (), "updating Gateway without GatewayProxy" )
@@ -228,7 +234,7 @@ spec:
228234 ResourceApplied ("HTTPRoute" , "test-route" , fmt .Sprintf (httpRouteForTest , "api7" ), 1 )
229235
230236 By ("Check if the route works without plugin" )
231- resp : = s .NewAPISIXClient ().
237+ resp = s .NewAPISIXClient ().
232238 GET ("/get" ).
233239 WithHost ("example.com" ).
234240 Expect ().
@@ -243,7 +249,7 @@ spec:
243249 err error
244250 )
245251
246- FIt ("Should work OK with error-page" , func () {
252+ It ("Should work OK with error-page" , func () {
247253 By ("Update GatewayProxy with PluginMetadata" )
248254 err = s .CreateResourceFromString (gatewayProxyWithPluginMetadata )
249255 Ω (err ).ShouldNot (HaveOccurred ())
0 commit comments