/
goss-shared.yaml
231 lines (231 loc) · 4.13 KB
/
goss-shared.yaml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
---
command:
echo 'hi':
exit-status: 0
stdout:
- hi
stderr: []
foobar:
exit-status: 127
stdout: []
stderr:
- not found
command-override:
exec: true
exit-status: 0
commandskip:
exec: false
exit-status: 0
skip: true
file:
{{range mkSlice "/etc/PAsswD" "/etc/group"}}
{{. | toLower}}:
exists: true
mode: '0644'
owner: root
group: root
filetype: file
contains:
- root
{{end}}
"/goss/hellogoss.txt":
exists: true
md5: 7c9bb14b3bf178e82c00c2a4398c93cd
sha256: 7f78ce27859049f725936f7b52c6e25d774012947d915e7b394402cfceb70c4c
"/tmp/goss/foobar":
exists: false
contains: []
"~root":
exists: true
mode: '0700'
"/tmp":
exists: true
mode: '1777'
"/dev/random":
exists: true
filetype: character-device
"/pipe":
exists: true
filetype: pipe
"/does/not/exist":
exists: true
contains:
- skip-this-test
skip: true
package:
foobar:
installed: false
{{- range $name, $ver := index .Vars .Env.OS "packages"}}
{{$name}}:
installed: true
versions:
- {{$ver}}
{{end}}
addr:
tcp://google.com:22:
reachable: false
timeout: 1000
tcp://google.com:443:
reachable: true
timeout: 5000
tcp://google.com:80:
reachable: false
timeout: 5000
local-address: 127.0.0.1
port:
tcp:9999:
listening: false
user:
root:
exists: true
foobar:
exists: false
group:
foobar:
exists: false
dns:
CAA:dnstest.io:
resolvable: true
addrs:
- 0 issue comodoca.com
- 0 issue letsencrypt.org
- 0 issuewild ;
timeout: 2000
server: 8.8.8.8
CNAME:c.dnstest.io:
resolvable: true
addrs:
- a.dnstest.io.
timeout: 2000
server: 8.8.8.8
c.dnstest.io:
resolvable: true
addrs:
- 192.30.252.153
timeout: 2000
server: 8.8.8.8:53
MX:dnstest.io:
resolvable: true
addrs:
- 10 b.dnstest.io.
- 5 a.dnstest.io.
timeout: 2000
server: 8.8.8.8:53
NS:dnstest.io:
resolvable: true
addrs:
- ns1.dnstest.io.
- ns2.dnstest.io.
timeout: 2000
server: 8.8.8.8
PTR:54.243.154.1:
resolvable: true
addrs:
- ec2-54-243-154-1.compute-1.amazonaws.com.
timeout: 2000
server: 8.8.8.8
SRV:_https._tcp.dnstest.io:
resolvable: true
addrs:
- 0 5 443 a.dnstest.io.
- 10 10 443 b.dnstest.io.
timeout: 2000
server: 8.8.8.8
TXT:txt._test.dnstest.io:
resolvable: true
addrs:
- Hello DNS
timeout: 2000
server: 8.8.8.8
ip6.dnstest.io:
resolvable: true
addrs:
- 2404:6800:4001:807::200e
timeout: 2000
server: 8.8.8.8
localhost:
resolvable: true
addrs:
- 127.0.0.1
- "::1"
timeout: 2000
dnstest.io:
resolvable: true
server: 8.8.8.8
timeout: 2000
process:
foobar:
running: false
kernel-param:
kernel.ostype:
value: Linux
mount:
"/dev":
exists: true
opts:
- rw
- nosuid
source: tmpfs
filesystem: tmpfs
"/":
exists: true
usage:
and:
- lt: 25
- gt: 0
interface:
eth0:
exists: true
addrs:
contain-element:
have-prefix: '172.17'
http:
https://httpbin.org/headers:
status: 200
allow-insecure: false
timeout: 5000
request-headers:
- "Foo: bar"
header: ["Content-Type: application/json"]
body: ['"Foo": "bar"']
https://httpbin.org/basic-auth/username/secret:
status: 200
username: username
password: secret
https://httpbin.org/basic-auth/username/secret:
status: 401
username: username
password: wrong
matching:
has_substr:
content: some string
matches:
match-regexp: some str
has_2:
content:
- 2
matches:
contain-element: 2
has_foo_bar_and_baz:
content:
foo: bar
baz: bing
matches:
and:
- have-key-with-value:
foo: bar
- have-key: baz
semver:
content:
- 1.0.1
- 1.9.9
matches:
semver-constraint: ">1.0.0 <2.0.0 !=1.5.0"
semver2:
content:
- 1.0.1
- 1.5.0
- 1.9.9
matches:
not:
semver-constraint: ">1.0.0 <2.0.0 !=1.5.0"