Skip to content

Commit 5b92176

Browse files
committed
Add unix and linux integration test targets to Makefile
1 parent 8c95c05 commit 5b92176

6 files changed

Lines changed: 30 additions & 17 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
script:
4040
- curl -L https://github.com/SimonBaeumer/commander/releases/download/v0.3.0/commander-darwin-amd64 -o ~/bin/commander
4141
- chmod +x ~/bin/commander
42-
- make integration
42+
- make integration-unix
4343

4444
- name: windows Unit
4545
os: windows
@@ -68,7 +68,7 @@ jobs:
6868
- ./test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT
6969

7070
- name: Integration test
71-
script: make integration
71+
script: make integration-linux
7272

7373
- stage: deploy
7474
name: "Deployment"

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@ test-coverage-all:
4343
go test -coverprofile c.out ./...
4444
./integration/teardown_unix.sh
4545

46-
integration: build
46+
integration-unix: build
4747
$(info INFO: Starting build $@)
4848
./integration/setup_unix.sh
4949
commander test commander_unix.yaml
5050
./integration/teardown_unix.sh
5151

52+
integration-linux: build
53+
$(info INFO: Starting build $@)
54+
./integration/setup_unix.sh
55+
commander test commander_unix.yaml
56+
commander test commander_linux.yaml
57+
./integration/teardown_unix.sh
58+
5259
integration-windows: build
5360
$(info INFO: Starting build $@)
5461
commander test commander_windows.yaml

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,14 @@ $ make test-coverage
729729
# Coverage with more complex tests like ssh execution
730730
$ make test-coverage-all
731731

732-
# Integration tests
733-
$ make integration
732+
# Integration tests for linux and macos
733+
$ make integration-unix
734+
735+
# Integration on linux
736+
$ make integration-linux
737+
738+
# Integration windows
739+
$ make integration-windows
734740

735741
# Add depdencies to vendor
736742
$ make deps

commander_linux.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tests:
2+
test nodes:
3+
command: ./commander test integration/unix/nodes.yaml
4+
stdout:
5+
contains:
6+
- ✓ [ssh-host] it should test ssh host
7+
- ✓ [ssh-host] it should set env variable
8+
- ✓ [ssh-host-default] it should be executed on ssh-host-default
9+
- ✓ [ssh-host] it should test multiple hosts
10+
- ✓ [ssh-host-default] it should test multiple hosts
11+
- ✓ [local] it should test multiple hosts
12+
exit-code: 0

commander_unix.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,3 @@ tests:
6565
- ✓ [local] it should retry failed commands, retries 2
6666
- ✗ [local] it should retry failed commands with an interval, retries 2
6767
exit-code: 1
68-
69-
test nodes:
70-
command: ./commander test integration/unix/nodes.yaml
71-
stdout:
72-
contains:
73-
- ✓ [ssh-host] it should test ssh host
74-
- ✓ [ssh-host] it should set env variable
75-
- ✓ [ssh-host-default] it should be executed on ssh-host-default
76-
- ✓ [ssh-host] it should test multiple hosts
77-
- ✓ [ssh-host-default] it should test multiple hosts
78-
- ✓ [local] it should test multiple hosts
79-
exit-code: 0

0 commit comments

Comments
 (0)