Skip to content

Commit

Permalink
use custom step failure handling in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Nov 26, 2024
1 parent 3c78e81 commit 69af990
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ e2e: --ensure-venom
VENOM_VAR_gcpBillingID=${PLRL_CLI_E2E_GCLOUD_BILLING_ID} \
PLURAL_LOGIN_AFFIRM_CURRENT_USER=true \
PLURAL_UP_AFFIRM_DEPLOY=true \
venom run -vv --html-report --format=json --output-dir testout --stop-on-failure test/plural
venom run -vv --html-report --format=json --output-dir testout test/plural

.PHONY: format
format: ## formats all go code to prep for linting
Expand Down
25 changes: 25 additions & 0 deletions test/plural/up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ testcases:
- name: Check required arguments
steps:
- type: check-required
assertions:
- result.code ShouldEqual 0

- name: Setup Git
steps:
- type: git-setup
assertions:
- result.code ShouldEqual 0

- name: Setup workspace file
steps:
Expand All @@ -74,10 +78,15 @@ testcases:
azureSubscriptionId: {{ .azureSubscriptionId }}
azureTenantId: {{ .azureTenantId }}
azureStorageAccount: {{ .azureStorageAccount }}
assertions:
- result.code ShouldEqual 0


- name: Setup context file
steps:
- type: context-setup
assertions:
- result.code ShouldEqual 0

- name: Plural login
steps:
Expand All @@ -87,6 +96,8 @@ testcases:
pluralHome: {{ .pluralHome }}
token: {{ .token }}
key: {{ .pluralKey }}
assertions:
- result.code ShouldEqual 0

- name: Google Cloud Setup
skip:
Expand All @@ -98,6 +109,8 @@ testcases:
orgID: {{ .gcpOrgID }}
billingID: {{ .gcpBillingID }}
project: {{ .project }}
assertions:
- result.code ShouldEqual 0

- name: Plural up
steps:
Expand All @@ -113,6 +126,10 @@ testcases:
steps:
- type: azure-teardown
resourceGroup: {{ .project }}
retry: 3
retry_if:
- result.code ShouldNotEqual 0
delay: 5

- name: Google Cloud teardown
skip:
Expand All @@ -122,9 +139,17 @@ testcases:
email: {{ .gcpEmail }}
saKeyFile: {{ .gcpSAKeyFile }}
project: {{ .project }}
retry: 3
retry_if:
- result.code ShouldNotEqual 0
delay: 5

- name: Git teardown
steps:
- type: git-teardown
branch: {{ .branch }}
directory: {{ .directory }}
retry: 3
retry_if:
- result.code ShouldNotEqual 0
delay: 5

0 comments on commit 69af990

Please sign in to comment.