@@ -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