-
Notifications
You must be signed in to change notification settings - Fork 92
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 <[email protected]>
- Loading branch information
1 parent
c76f2fa
commit 2435e0e
Showing
1 changed file
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters