-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructure-tests.yaml
More file actions
105 lines (89 loc) · 2.56 KB
/
structure-tests.yaml
File metadata and controls
105 lines (89 loc) · 2.56 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
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
schemaVersion: "2.0.0"
# Validate binary
fileExistenceTests:
- name: "powerpipe binary exists"
path: "/usr/local/bin/powerpipe"
shouldExist: true
permissions: "-rwxr-xr-x"
- name: "powerpipe home dir exists"
path: "/home/powerpipe"
shouldExist: true
- name: "powerpipe install dir exists"
path: "/home/powerpipe/.powerpipe"
shouldExist: true
- name: "workspace dir exists"
path: "/workspace"
shouldExist: true
# Validate image metadata
metadataTest:
labels:
- key: "org.opencontainers.image.title"
value: "Powerpipe"
- key: "org.opencontainers.image.vendor"
value: "devops-ia"
- key: "org.opencontainers.image.source"
value: "https://github.com/devops-ia/powerpipe"
exposedPorts:
- "9033"
cmd:
- "powerpipe"
- "server"
workdir: "/workspace"
user: "9193"
# Validate ENV vars and binary behavior
commandTests:
- name: "POWERPIPE_UPDATE_CHECK is false"
command: "sh"
args: ["-c", "printenv POWERPIPE_UPDATE_CHECK"]
expectedOutput: ["false"]
exitCode: 0
- name: "POWERPIPE_TELEMETRY is none"
command: "sh"
args: ["-c", "printenv POWERPIPE_TELEMETRY"]
expectedOutput: ["none"]
exitCode: 0
- name: "POWERPIPE_INSTALL_DIR is set"
command: "sh"
args: ["-c", "printenv POWERPIPE_INSTALL_DIR"]
expectedOutput: ["/home/powerpipe/.powerpipe"]
exitCode: 0
- name: "POWERPIPE_LISTEN is network"
command: "sh"
args: ["-c", "printenv POWERPIPE_LISTEN"]
expectedOutput: ["network"]
exitCode: 0
- name: "POWERPIPE_MOD_LOCATION is workspace"
command: "sh"
args: ["-c", "printenv POWERPIPE_MOD_LOCATION"]
expectedOutput: ["/workspace"]
exitCode: 0
- name: "POWERPIPE_LOG_LEVEL is warn"
command: "sh"
args: ["-c", "printenv POWERPIPE_LOG_LEVEL"]
expectedOutput: ["warn"]
exitCode: 0
- name: "POWERPIPE_PORT is 9033"
command: "sh"
args: ["-c", "printenv POWERPIPE_PORT"]
expectedOutput: ["9033"]
exitCode: 0
- name: "POWERPIPE_MEMORY_MAX_MB is 1024"
command: "sh"
args: ["-c", "printenv POWERPIPE_MEMORY_MAX_MB"]
expectedOutput: ["1024"]
exitCode: 0
- name: "POWERPIPE_MAX_PARALLEL is 10"
command: "sh"
args: ["-c", "printenv POWERPIPE_MAX_PARALLEL"]
expectedOutput: ["10"]
exitCode: 0
- name: "powerpipe --version returns version string"
command: "powerpipe"
args: ["--version"]
expectedOutput:
- "Powerpipe v[0-9]+\\.[0-9]+\\.[0-9]+"
exitCode: 0
- name: "powerpipe --help exits 0"
command: "powerpipe"
args: ["--help"]
exitCode: 0