1
0
mirror of synced 2026-02-06 19:05:55 +00:00

tests/int: Add separate resource cleanup step

Introduce a destroy-only mode in the test runner to run terraform
destroy for the respective cloud provider configurations. This can be
used to destroy cloud resources without going through the whole
provision-test process.

Add a new step in github actions workflow to run the test binary in
destoy-only mode at the very end irrespective of the result of the
previous steps. This ensures that the infrastructure is always
destroyed, even if the CI job is cancelled.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
Sunny
2024-01-08 14:35:20 +00:00
parent 1532687191
commit 94c9b13fbd
7 changed files with 60 additions and 7 deletions

View File

@@ -17,6 +17,14 @@ test-azure:
test-gcp:
$(MAKE) test PROVIDER_ARG="-provider gcp"
destroy:
go test -timeout $(TEST_TIMEOUT) -v ./ $(GO_TEST_ARGS) $(PROVIDER_ARG) -destroy-only
destroy-azure:
$(MAKE) destroy PROVIDER_ARG="-provider azure"
destroy-gcp:
$(MAKE) destroy PROVIDER_ARG="-provider gcp"
sops-check:
ifeq ($(shell which sops),)