diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d8b1223..59c5452 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -49,12 +49,22 @@ jobs: layerform config set-context test-cloud -t cloud --url https://demo.layerform.dev --email foo@bar.com --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: | @@ -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