In case of errors running e2e tests, print the generated nginx.conf file

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-06-23 22:34:07 -04:00
parent ca6b61f639
commit dca5557c50
No known key found for this signature in database
GPG key ID: 786136016A8BA02A

View file

@ -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)
}
}