AlinsRan commented on code in PR #2501:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2501#discussion_r2262482857


##########
test/e2e/crds/v1alpha1/backendtrafficpolicy.go:
##########
@@ -125,7 +133,26 @@ spec:
 `
 
                BeforeEach(func() {
-                       s.ApplyDefaultGatewayResource(defaultGatewayProxy, 
defaultGatewayClass, defaultGateway, defaultHTTPRoute)
+                       gatewayName := s.Namespace()
+                       By("create GatewayProxy")
+                       gatewayProxyName := gatewayName
+                       err = 
s.CreateResourceFromString(fmt.Sprintf(defaultGatewayProxy, gatewayProxyName, 
s.Deployer.GetAdminEndpoint(), s.AdminKey()))
+                       Expect(err).NotTo(HaveOccurred(), "creating 
GatewayProxy")
+                       time.Sleep(time.Second)
+
+                       By("create GatewayClass")
+                       gatewayClassName := fmt.Sprintf("apisix-%d", 
time.Now().Unix())
+                       err = 
s.CreateResourceFromString(fmt.Sprintf(defaultGatewayClass, gatewayClassName, 
s.GetControllerName()))
+                       Expect(err).NotTo(HaveOccurred(), "creating 
GatewayClass")
+                       time.Sleep(time.Second)
+
+                       By("create Gateway")
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultGateway, 
gatewayName, gatewayClassName, gatewayProxyName), s.Namespace())

Review Comment:
   Only cluster level resources will use 
`CreateResourceFromStringWithnamespace`, or a fixed namespace.



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