Skip to content

Commit a932c9b

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent f4f5a52 commit a932c9b

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

test/e2e/apisix/pluginconfig.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -505,43 +505,5 @@ spec:
505505
err = s.DeleteResource("Secret", "plugin-secret")
506506
Expect(err).ShouldNot(HaveOccurred(), "deleting Secret")
507507
})
508-
509-
It("Test ApisixPluginConfig not found", func() {
510-
const apisixRouteSpec = `
511-
apiVersion: apisix.apache.org/v2
512-
kind: ApisixRoute
513-
metadata:
514-
name: test-route-not-found
515-
spec:
516-
ingressClassName: apisix
517-
http:
518-
- name: rule0
519-
match:
520-
paths:
521-
- /*
522-
backends:
523-
- serviceName: httpbin-service-e2e-test
524-
servicePort: 80
525-
plugin_config_name: non-existent-plugin-config
526-
`
527-
528-
By("apply ApisixRoute that references non-existent ApisixPluginConfig")
529-
var apisixRoute apiv2.ApisixRoute
530-
applier.MustApplyAPIv2(types.NamespacedName{Namespace: s.Namespace(), Name: "test-route-not-found"}, &apisixRoute, apisixRouteSpec)
531-
532-
By("verify ApisixRoute still works but without plugin config")
533-
request := func() int {
534-
return s.NewAPISIXClient().GET("/get").Expect().Raw().StatusCode
535-
}
536-
Eventually(request).WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusOK))
537-
538-
By("verify no plugin headers are present")
539-
resp := s.NewAPISIXClient().GET("/get").Expect().Status(http.StatusOK)
540-
resp.Header("X-Plugin-Config").IsEmpty()
541-
542-
By("delete resources")
543-
err := s.DeleteResource("ApisixRoute", "test-route-not-found")
544-
Expect(err).ShouldNot(HaveOccurred(), "deleting ApisixRoute")
545-
})
546508
})
547509
})

0 commit comments

Comments
 (0)