-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructure-tests.yaml
More file actions
80 lines (68 loc) · 1.88 KB
/
structure-tests.yaml
File metadata and controls
80 lines (68 loc) · 1.88 KB
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
schemaVersion: "2.0.0"
# Validate binary
fileExistenceTests:
- name: "steampipe binary exists"
path: "/usr/local/bin/steampipe"
shouldExist: true
permissions: "-rwxr-xr-x"
- name: "steampipe home dir exists"
path: "/home/steampipe"
shouldExist: true
- name: "steampipe install dir exists"
path: "/home/steampipe/.steampipe"
shouldExist: true
- name: "workspace dir exists"
path: "/workspace"
shouldExist: true
# Validate binary runs
fileContentTests: []
# Validate image metadata
metadataTest:
labels:
- key: "org.opencontainers.image.title"
value: "Steampipe"
- key: "org.opencontainers.image.vendor"
value: "devops-ia"
- key: "org.opencontainers.image.source"
value: "https://github.com/devops-ia/steampipe"
exposedPorts:
- "9193"
cmd:
- "steampipe"
- "service"
- "start"
- "--foreground"
workdir: "/home/steampipe"
user: "9193"
# Validate ENV vars and binary behavior
commandTests:
- name: "STEAMPIPE_UPDATE_CHECK is false"
command: "sh"
args: ["-c", "printenv STEAMPIPE_UPDATE_CHECK"]
expectedOutput: ["false"]
exitCode: 0
- name: "STEAMPIPE_TELEMETRY is none"
command: "sh"
args: ["-c", "printenv STEAMPIPE_TELEMETRY"]
expectedOutput: ["none"]
exitCode: 0
- name: "STEAMPIPE_INSTALL_DIR is set"
command: "sh"
args: ["-c", "printenv STEAMPIPE_INSTALL_DIR"]
expectedOutput: ["/home/steampipe/.steampipe"]
exitCode: 0
- name: "STEAMPIPE_LOG_LEVEL is warn"
command: "sh"
args: ["-c", "printenv STEAMPIPE_LOG_LEVEL"]
expectedOutput: ["warn"]
exitCode: 0
- name: "steampipe --version returns version string"
command: "steampipe"
args: ["--version"]
expectedOutput:
- "Steampipe v[0-9]+\\.[0-9]+\\.[0-9]+"
exitCode: 0
- name: "steampipe --help exits 0"
command: "steampipe"
args: ["--help"]
exitCode: 0