Skip to content

Commit 766d457

Browse files
committed
add integration test
1 parent 9436e79 commit 766d457

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

commander_linux.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,19 @@ tests:
3737
stdout:
3838
contains:
3939
- Use --dir to test directories with multiple test files
40-
exit-code: 1
40+
exit-code: 1
41+
42+
test nodes with stdin:
43+
command: cat integration/linux/nodes.yaml | ./commander test -
44+
stdout:
45+
contains:
46+
- ✓ [ssh-host] it should test ssh host
47+
- ✓ [ssh-host] it should set env variable
48+
- ✓ [ssh-host-default] it should be executed on ssh-host-default
49+
- "- [ssh-host-default] it should skip, was skipped"
50+
- "- [ssh-host] it should skip, was skipped"
51+
- "- [local] it should skip, was skipped"
52+
- ✓ [ssh-host] it should test multiple hosts
53+
- ✓ [ssh-host-default] it should test multiple hosts
54+
- ✓ [local] it should test multiple hosts
55+
exit-code: 0

commander_unix.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,13 @@ tests:
134134
- ✓ [local] it should exit with error code
135135
- "- [local] it should skip, was skipped"
136136
line-count: 17
137-
exit-code: 0
137+
exit-code: 0
138+
139+
test retries with stdin:
140+
command: cat integration/unix/retries.yaml | ./commander test -
141+
stdout:
142+
contains:
143+
- ✗ [local] echo hello, retries 3
144+
- ✓ [local] it should retry failed commands, retries 2
145+
- ✗ [local] it should retry failed commands with an interval, retries 2
146+
exit-code: 1

commander_windows.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,10 @@ tests:
6363
contains:
6464
- ✗ [local] echo hello, retries 3
6565
exit-code: 1
66+
67+
test retries with stdin:
68+
command: cat integration/windows/retries.yaml | commander.exe test -
69+
stdout:
70+
contains:
71+
- ✗ [local] echo hello, retries 3
72+
exit-code: 1

0 commit comments

Comments
 (0)