stillfox-lee commented on code in PR #1158:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1158#discussion_r924039354


##########
test/e2e/scaffold/scaffold.go:
##########
@@ -426,30 +426,16 @@ func (s *Scaffold) beforeEach() {
 func (s *Scaffold) afterEach() {
        defer ginkgo.GinkgoRecover()
 
-       if ginkgo.CurrentSpecReport().Failed() {
-               _, _ = fmt.Fprintln(ginkgo.GinkgoWriter, "Dumping namespace 
contents")
-               output, _ := k8s.RunKubectlAndGetOutputE(ginkgo.GinkgoT(), 
s.kubectlOptions, "get", "deploy,sts,svc,pods")
-               if output != "" {
-                       _, _ = fmt.Fprintln(ginkgo.GinkgoWriter, output)
-               }
-               output, _ = k8s.RunKubectlAndGetOutputE(ginkgo.GinkgoT(), 
s.kubectlOptions, "describe", "pods")
-               if output != "" {
-                       _, _ = fmt.Fprintln(ginkgo.GinkgoWriter, output)
-               }
-               // Get the logs of apisix
-               output = s.GetDeploymentLogs("apisix-deployment-e2e-test")
-               if output != "" {
-                       _, _ = fmt.Fprintln(ginkgo.GinkgoWriter, output)
-               }
-               // Get the logs of ingress
-               output = 
s.GetDeploymentLogs("ingress-apisix-controller-deployment-e2e-test")
-               if output != "" {
-                       _, _ = fmt.Fprintln(ginkgo.GinkgoWriter, output)
-               }
+       shouldDeleteNamespace := true
+       if ginkgo.CurrentSpecReport().Failed() && os.Getenv("E2E_ENV") == "dev" 
{
+               // Keep namespace if test failed in dev mode
+               shouldDeleteNamespace = false

Review Comment:
   Sure, my bad. Of course we need dump namespace info in CI. Thanks for your 
review!



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