Skip to content

Commit

Permalink
Clean up E2E Operator resources if tests fail or are cancelled
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thpierce authored Jul 10, 2024
1 parent 90901b1 commit 7922a65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-with-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
# file locks are being held from SIGTERMS dispatched in previous
# steps.
- name: Destroy resources
if: ${{ cancelled() }}
if: ${{ cancelled() || failure() }}
shell: bash {0}
working-directory: testing-framework/terraform
run: |
Expand All @@ -209,4 +209,4 @@ jobs:
success: ${{ needs.run-batch-job.result == 'success' }}
region: us-west-2
secrets:
roleArn: ${{ secrets.METRICS_ROLE_ARN }}
roleArn: ${{ secrets.METRICS_ROLE_ARN }}

0 comments on commit 7922a65

Please sign in to comment.