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


##########
test/e2e/ingress/ingress.go:
##########
@@ -231,81 +232,93 @@ spec:
                                Status(200)
                })
 
-               It("Proxy External Service", func() {
+               PIt("Proxy External Service", func() {
                        By("create GatewayProxy")
-                       gatewayProxy := fmt.Sprintf(gatewayProxyYaml, 
s.Deployer.GetAdminEndpoint(), s.AdminKey())
-                       err := 
s.CreateResourceFromStringWithNamespace(gatewayProxy, "default")
+                       gatewayProxy := fmt.Sprintf(gatewayProxyYaml, 
s.Namespace(), s.Deployer.GetAdminEndpoint(), s.AdminKey())
+                       err := 
s.CreateResourceFromStringWithNamespace(gatewayProxy, s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating 
GatewayProxy")
                        time.Sleep(5 * time.Second)
 
                        By("create Default IngressClass")
-                       err = 
s.CreateResourceFromStringWithNamespace(defaultIngressClass, "")
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultIngressClass, 
s.GetControllerName(), s.Namespace()), s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating Default 
IngressClass")
                        time.Sleep(5 * time.Second)
 
                        By("create Ingress")
-                       err = 
s.CreateResourceFromString(ingressWithExternalName)
+                       ingressName := s.Namespace() + "-external"
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(ingressWithExternalName, 
ingressName), s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating Ingress 
without IngressClass")
-                       time.Sleep(5 * time.Second)
 
                        By("checking the external service response")
-                       s.NewAPISIXClient().
-                               GET("/get").
-                               WithHost("httpbin.external").
-                               Expect().
-                               Status(http.StatusOK)
+                       time.Sleep(10 * time.Minute)
+                       s.RequestAssert(&scaffold.RequestAssert{
+                               Method:   "GET",
+                               Path:     "/get",
+                               Host:     "httpbin.external",
+                               Check:    
scaffold.WithExpectedStatus(http.StatusOK),
+                               Interval: time.Second * 10,
+                               Timeout:  3 * time.Minute,
+                       })
                })
 
-               It("Delete Ingress during restart", func() {
+               PIt("Delete Ingress during restart", func() {
                        By("create GatewayProxy")
-                       gatewayProxy := fmt.Sprintf(gatewayProxyYaml, 
s.Deployer.GetAdminEndpoint(), s.AdminKey())
-                       err := 
s.CreateResourceFromStringWithNamespace(gatewayProxy, "default")
+                       gatewayProxy := fmt.Sprintf(gatewayProxyYaml, 
s.Namespace(), s.Deployer.GetAdminEndpoint(), s.AdminKey())
+                       err := 
s.CreateResourceFromStringWithNamespace(gatewayProxy, s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating 
GatewayProxy")
                        time.Sleep(5 * time.Second)
 
                        By("create Default IngressClass")
-                       err = 
s.CreateResourceFromStringWithNamespace(defaultIngressClass, "")
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultIngressClass, 
s.GetControllerName(), s.Namespace()), s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating Default 
IngressClass")
                        time.Sleep(5 * time.Second)
 
                        By("create Ingress with ExternalName")
-                       err = 
s.CreateResourceFromString(ingressWithExternalName)
+                       ingressName := s.Namespace() + "-external"
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(ingressWithExternalName, 
ingressName), s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating Ingress 
without IngressClass")
                        time.Sleep(5 * time.Second)
 
                        By("create Ingress")
-                       err = s.CreateResourceFromString(defaultIngress)
+                       err = 
s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultIngress, 
s.Namespace()), s.Namespace())
                        Expect(err).NotTo(HaveOccurred(), "creating Ingress 
without IngressClass")
-                       time.Sleep(5 * time.Second)
 
                        By("checking the external service response")
-                       s.NewAPISIXClient().
-                               GET("/get").
-                               WithHost("httpbin.external").
-                               Expect().
-                               Status(http.StatusOK)
-
-                       s.NewAPISIXClient().
-                               GET("/get").
-                               WithHost("default.example.com").
-                               Expect().
-                               Status(200)
-
+                       time.Sleep(10 * time.Minute)

Review Comment:
   wow I really forgot to remove this😂



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