Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/e2e: ensure Teardown run on failure (DoTestNginxDeployment)
The teardown function doesn't run if WithSetup fail, which might leave the deployment on the cluster and it might mess with next tests. This replaced some t.Fatal() with t.Error() so that the current goroutine doesn't exit, in fact, the execution continues after the t.Error() call but the test is marked failed. So I had to proper return when t.Error(). On WithSetup() failing, it doesn't make sense to run the Assess() and the only way to pass the status down to Assess() is through the `ctx` variable (due to a limitation on the k8s e2e framework, the `t` object is not shared). Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
- Loading branch information