From dca5557c50ffcbf068a52cebf3e7c776f253d32f Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sun, 23 Jun 2019 22:34:07 -0400 Subject: [PATCH] In case of errors running e2e tests, print the generated nginx.conf file --- test/e2e/framework/framework.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index cc784497d..ca8aaf9ed 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -128,6 +128,20 @@ func (f *Framework) AfterEach() { Expect(err).ToNot(HaveOccurred()) By("Dumping NGINX logs after a failure running a test") Logf("%v", log) + + pod, err := getIngressNGINXPod(f.Namespace, f.KubeClientSet) + if err != nil { + return + } + + cmd := fmt.Sprintf("cat /etc/nginx/nginx.conf") + o, err := f.ExecCommand(pod, cmd) + if err != nil { + return + } + + By("Dumping NGINX configuration after a failure running a test") + Logf("%v", o) } }