-
Notifications
You must be signed in to change notification settings - Fork 13
/
coyote.yml
103 lines (90 loc) · 2.06 KB
/
coyote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
- name: coyote
title: Sample YML
- name: coyote
# global vars
vars:
TEST: echo
- name: test
# local vars (have precedence)
vars:
TEST: ls
entries:
- name: ls command
command: |
%TEST%
-lR
.
- name: echo command
command: echo hello
- name: error unless you are root
command: "%TEST% /root"
- name: moar tests
entries:
- name: base64
command: |
bash -c 'echo Hello World | base64'
- name: test timeout
entries:
- name: sleep timeout
command: sleep 3
timeout: 1s
- name: test stdin
entries:
- name: cat from stdin
command: cat
stdin: hello
- name: test env vars
entries:
- name: "%TEST% a var"
command: bash -c '%TEST% "$TEST"'
env: [ TEST="hello world" ]
- name: test text search
entries:
- name: match stdout
command: echo "hello world"
stdout_has:
- hello
- name: not match stdout
command: echo "hello world"
stdout_not_has: [ 'foo' ]
- name: not match expected stdout
command: echo "hello world"
stdout_has: [ foo ]
- name: match not expected stdout
command: echo "hello world"
stdout_not_has: [ hello ]
- name: test unique string generation
entries:
- name: command
command: echo %UNIQUE%
- name: stdin
command: cat
stdin: |
First: %UNIQUE% Second: %UNIQUE%
- name: test unique string matching
entries:
- name: command
command: echo %UNIQUE%
- name: stdin
command: cat
stdin: |
First: %UNIQUE_1% Second: %UNIQUE%
stdout_has: [ "%UNIQUE_1%" ]
- name: test ignore exit code
entries:
- name: ignore exit code
command: false
ignore_exit_code: true
- name: test persisting unique variables
entries:
- name: first instance
command: echo %UNIQUE_TEST% %UNIQUE_1%
- name: stdin
command: cat
stdin: |
Should be the same as before. First: %UNIQUE_TEST% Second: %UNIQUE_1%
- name: skip test
skip: true
entries:
- name: skip or fail
command: exit 1