Skip to content

Commit

Permalink
Merge pull request #41 from SimonBaeumer/use-commander-v0.2.1
Browse files Browse the repository at this point in the history
Use env config in commander tests
  • Loading branch information
SimonBaeumer authored Mar 19, 2019
2 parents e98c351 + 75e0bda commit 7e463e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: "dgoss tests"
before_script:
- curl -fsSL https://raw.githubusercontent.com/SimonBaeumer/commander/master/install.sh | COMMANDER_DST=~/bin sh
- curl -fsSL https://raw.githubusercontent.com/SimonBaeumer/commander/master/install.sh | COMMANDER_VER=v0.2.1 COMMANDER_DST=~/bin sh
script:
- make build
- make test-dgoss
Expand Down
18 changes: 15 additions & 3 deletions extras/dgoss/commander.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
config:
timeout: 20000 # Set timeout to 20s
env:
- GOSS_PATH=./../../release/goss-linux-amd64
- GOSS_FILES_STRATEGY=mount
tests:
run dgoss with mount strategy:
command: "GOSS_PATH=./../../release/goss-linux-amd64 GOSS_FILES_STRATEGY=mount ./dgoss run nginx:latest"
command: "./dgoss run nginx:latest"
stdout:
contains:
- "Count: 1, Failed: 0, Skipped: 0"
Expand All @@ -10,7 +15,11 @@ tests:
exit-code: 0

run dgoss with cp strategy:
command: "GOSS_PATH=./../../release/goss-linux-amd64 GOSS_FILES_STRATEGY=cp ./dgoss run nginx:latest"
command: "./dgoss run nginx:latest"
config:
env:
- GOSS_PATH=./../../release/goss-linux-amd64
- GOSS_FILES_STRATEGY=cp
stdout:
contains:
- "Count: 1, Failed: 0, Skipped: 0"
Expand All @@ -21,5 +30,8 @@ tests:
exit-code: 0

run dgoss with invalid goss path:
command: "GOSS_PATH=/invalid ./dgoss run nginx:latest"
command: "./dgoss run nginx:latest"
config:
env:
- GOSS_PATH=invalid
exit-code: 1

0 comments on commit 7e463e2

Please sign in to comment.