Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
Update e2e test of use context.
  • Loading branch information
rafiramadhana committed Sep 19, 2023
1 parent 0a962c5 commit 98b2615
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,22 @@ jobs:
layerform config set-context test-cloud -t cloud --url https://demo.layerform.dev --email [email protected] --password strongpass
layerform config set-context test-local -t local --dir test
- name: layerform config select-context
- name: layerform config use-context
run: |
# fails if command succeeds
! layerform config select-context test-does-not-exist # context does not exist
! layerform config use-context test-does-not-exist # context does not exist
layerform config set-context test-local -t local --dir test && layerform config select-context test-local
# switch context to test-local
layerform config use-context test-local
layerfrom get-contexts | tee usecontext
grep -E '^\*\s+test-local' usecontext
!grep -E '^\*\s+test-s3' usecontext
# switch context to test-s3
layerform config use-context test-s3
layerfrom get-contexts | tee usecontext
!grep -E '^\*\s+test-local' usecontext
grep -E '^\*\s+test-s3' usecontext
- name: Configure
run: |
Expand All @@ -73,7 +83,7 @@ jobs:
grep 'No layer instances spawned' instances
- name: Spawn instances
run: |
run: |`
layerform spawn bar test_bar
layerform spawn baz test_baz
layerform spawn bar test_custom_foo --base foo=custom
Expand Down

0 comments on commit 98b2615

Please sign in to comment.