Skip to content

Commit 7922a65

Browse files
authored
Clean up E2E Operator resources if tests fail or are cancelled
In this PR, we are changing E2E Operator tests to clean up after themselves on failure or cancellation. Currently, this only happens on cancellation, but we need to do this on failure too, as tests can fail due to leaked resources.
1 parent 90901b1 commit 7922a65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/e2e-tests-with-operator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
# file locks are being held from SIGTERMS dispatched in previous
190190
# steps.
191191
- name: Destroy resources
192-
if: ${{ cancelled() }}
192+
if: ${{ cancelled() || failure() }}
193193
shell: bash {0}
194194
working-directory: testing-framework/terraform
195195
run: |
@@ -209,4 +209,4 @@ jobs:
209209
success: ${{ needs.run-batch-job.result == 'success' }}
210210
region: us-west-2
211211
secrets:
212-
roleArn: ${{ secrets.METRICS_ROLE_ARN }}
212+
roleArn: ${{ secrets.METRICS_ROLE_ARN }}

0 commit comments

Comments
 (0)