forked from helm-unittest/helm-unittest
-
Notifications
You must be signed in to change notification settings - Fork 69
/
deployment_test.yaml
52 lines (52 loc) · 1.4 KB
/
deployment_test.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
suite: test deployment that would be fail
templates:
- configmap.yaml
- deployment.yaml
tests:
- it: should fail all kinds of assertion
values:
- ./values/image.yaml
template: deployment.yaml
set:
service.internalPort: 8080
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: nginx:stable
- notEqual:
path: spec.template.spec.containers[0].image
value: apache:latest
- matchRegex:
path: metadata.name
pattern: ^.*-foobar$
- notMatchRegex:
path: metadata.name
pattern: ^.*-basic$
- contains:
path: spec.template.spec.containers[0].ports
content:
containerPort: 80
- notContains:
path: spec.template.spec.containers[0].ports
content:
containerPort: 8080
- isNull:
path: spec.template
- isNotNull:
path: spec.template.nodeSelector
- isEmpty:
path: spec.template.spec.containers[0]
- isNotEmpty:
path: spec.template.spec.containers[0].resources
- isKind:
of: Pod
- isAPIVersion:
of: v2
- hasDocuments:
count: 1
- matchSnapshot:
path: spec
- contains:
path: spec.template.spec.containers
content: 'foo'
count: 1234567890 # or 6.8 or -10 or 0