Skip to content

Commit 3783db4

Browse files
issue-457: added unit test suite level
Signed-off-by: ivan katliarchuk <[email protected]>
1 parent 0db7f1c commit 3783db4

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
suite: test chart renders with dependencies and version overrides
2+
chart:
3+
version: 1.2.3
4+
tests:
5+
- it: should render chart with dependencies and suite level version override
6+
asserts:
7+
- matchRegex:
8+
path: metadata.labels["chart"]
9+
pattern: "^.*-1.2.3"
10+
template: charts/another-postgresql/templates/deployment.yaml
11+
- matchRegex:
12+
path: metadata.labels["chart"]
13+
pattern: "^.*-1.2.3"
14+
template: charts/postgresql/templates/deployment.yaml
15+
- matchRegex:
16+
path: metadata.labels["helm.sh/chart"]
17+
pattern: "^.*-1.2.3"
18+
template: charts/cert-manager/templates/deployment.yaml
19+
20+
- it: should render chart with dependencies and test level version override
21+
templates:
22+
- template.yaml
23+
- charts/another-postgresql/templates/deployment.yaml
24+
- charts/postgresql/templates/deployment.yaml
25+
- charts/cert-manager/templates/deployment.yaml
26+
chart:
27+
version: 0.0.1
28+
set:
29+
cert-manager:
30+
global:
31+
commonLabels:
32+
chart: version-0.0.1
33+
postgresql:
34+
postgresPassword: password
35+
another-postgresql:
36+
postgresPassword: password
37+
asserts:
38+
- matchRegex:
39+
path: metadata.labels["chart"]
40+
pattern: "^.*-0.0.1"

issue-457/tests/full_snapshot_test.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

issue-457/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ command: "echo test this"
22

33
# another-postgresql:
44
# enabled: true
5+
cert-manager:
6+
global:
7+
commonLabels:
8+
chart: version-1.2.3

0 commit comments

Comments
 (0)