Chever-John commented on code in PR #976:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/976#discussion_r855986209


##########
test/e2e/suite-plugins/referer-restriction.go:
##########
@@ -101,6 +101,125 @@ spec:
                resp.Body().Contains("Your referer host is not allowed")
        })
 
+       ginkgo.It("referer-restriction plugin configuration blacklist list", 
func() {
+               backendSvc, backendPorts := s.DefaultHTTPBackend()
+               ar := fmt.Sprintf(`
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+ name: httpbin-route
+spec:
+ http:
+ - name: rule1
+   match:
+     hosts:
+     - httpbin.org
+     paths:
+       - /ip
+   backends:
+   - serviceName: %s
+     servicePort: %d
+     weight: 10
+   plugins:
+   - name: referer-restriction
+     enable: true
+     config:
+       blacklist:
+         - test.com
+         - "*.foo.com"
+`, backendSvc, backendPorts[0])
+
+               assert.Nil(ginkgo.GinkgoT(), s.CreateResourceFromString(ar))
+
+               err := s.EnsureNumApisixUpstreamsCreated(1)
+               assert.Nil(ginkgo.GinkgoT(), err, "Checking number of 
upstreams")
+               err = s.EnsureNumApisixRoutesCreated(1)
+               assert.Nil(ginkgo.GinkgoT(), err, "Checking number of routes")

Review Comment:
   Sure~



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to