Skip to content

Commit cc0eeba

Browse files
committed
add test case
1 parent 09779ad commit cc0eeba

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/e2e/gatewayapi/httproute.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,29 @@ spec:
223223
Expect().
224224
Status(404)
225225
})
226+
227+
It("Delete Gateway after apply HTTPRoute", func() {
228+
By("create HTTPRoute")
229+
ResourceApplied("HTTPRoute", "httpbin", exactRouteByGet, 1)
230+
231+
By("access dataplane to check the HTTPRoute")
232+
s.NewAPISIXHttpsClient("api6.com").
233+
GET("/get").
234+
WithHost("api6.com").
235+
Expect().
236+
Status(200)
237+
238+
By("delete Gateway")
239+
err := s.DeleteResourceFromString(defautlGateway)
240+
Expect(err).NotTo(HaveOccurred(), "deleting Gateway")
241+
time.Sleep(5 * time.Second)
242+
243+
s.NewAPISIXHttpsClient("api6.com").
244+
GET("/get").
245+
WithHost("api6.com").
246+
Expect().
247+
Status(404)
248+
})
226249
})
227250
Context("HTTPRoute Rule Match", func() {
228251
var exactRouteByGet = `

0 commit comments

Comments
 (0)