Skip to content

Commit

Permalink
Use ruby script to print env variables (works around win vs. linux sh…
Browse files Browse the repository at this point in the history
…ell syntax)
  • Loading branch information
rradczewski committed May 24, 2024
1 parent 32ac82d commit 819dfbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions fixtures/environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ARGV.each { |arg| puts ENV[arg] }
27 changes: 15 additions & 12 deletions fixtures/environment/smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
command:
- ruby
- fixtures/environment.rb

tests:
- name: environment
environment:
TEST_ENV: "test-value"
command: |
echo $TEST_ENV
args:
- TEST_ENV
stdout: |
test-value
- name: inherits
command: |
echo $ONLY_DEFINED_IN_SPEC
args:
- ONLY_DEFINED_IN_SPEC
stdout: |
defined_in_spec
- name: overwrites
environment:
OVERWRITE_IN_FIXTURE: "overwritten"
command: |
echo $OVERWRITE_IN_FIXTURE
args:
- OVERWRITE_IN_FIXTURE
stdout: |
overwritten
- name: not-defined
command: |
echo $NOT_DEFINED
args:
- NOT_DEFINED
stdout: "\n"

- name: spec-is-merged-into-fixture-not-replaced
environment:
OVERWRITE_IN_FIXTURE: "overwritten"
command: |
echo $OVERWRITE_IN_FIXTURE
echo $ONLY_DEFINED_IN_SPEC
args:
- OVERWRITE_IN_FIXTURE
- ONLY_DEFINED_IN_SPEC
stdout: |
overwritten
defined_in_spec

0 comments on commit 819dfbf

Please # to comment.