Skip to content

Commit a7d4429

Browse files
committed
chore: fix broken tests
Signed-off-by: Roberto Scolaro <[email protected]>
1 parent b57ce58 commit a7d4429

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

charts/shield/tests/cluster/deployment_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ tests:
14411441

14421442
- it: Host Alias are not included by default
14431443
asserts:
1444-
- notContains:
1444+
- isNull:
14451445
path: spec.template.spec.hostAliases
14461446
template: templates/cluster/deployment.yaml
14471447

charts/shield/tests/host/daemonset-windows_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ tests:
467467

468468
- it: Host Alias are not included by default
469469
asserts:
470-
- notContains:
470+
- isNull:
471471
path: spec.template.spec.hostAliases
472472

473473
- it: Single Host Alias is included if configured

charts/shield/tests/host/daemonset_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ tests:
844844

845845
- it: Host Alias are not included by default
846846
asserts:
847-
- notContains:
847+
- isNull:
848848
path: spec.template.spec.hostAliases
849849

850850
- it: Single Host Alias is included if configured

charts/shield/tests/host/secrets_test.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ tests:
7777
enabled: true
7878
password_existing_secret: existing-secret
7979
asserts:
80-
- notExists:
80+
- containsDocument:
8181
kind: Secret
8282
apiVersion: v1
8383
name: release-name-shield-host-rapid-response
8484
namespace: shield-namespace
85-
template: templates/host/secrets.yaml
85+
not: true
86+
template: host/secrets.yaml
8687
- equal:
8788
path: spec.template.spec.containers[?(@.name == "sysdig-host-shield")].env[?(@.name == "PASSWORD")]
8889
value:
@@ -91,7 +92,7 @@ tests:
9192
secretKeyRef:
9293
name: existing-secret
9394
key: password
94-
template: templates/host/daemonset.yaml
95+
template: templates/host/daemonset.yaml
9596

9697
- it: Test Rapid Response using existing secret for password with custom key
9798
set:
@@ -102,11 +103,12 @@ tests:
102103
password_existing_secret: existing-secret
103104
password_existing_secret_key: custom-key
104105
asserts:
105-
- notExists:
106+
- containsDocument:
106107
kind: Secret
107108
apiVersion: v1
108109
name: release-name-shield-host-rapid-response
109110
namespace: shield-namespace
111+
not: true
110112
template: templates/host/secrets.yaml
111113
- equal:
112114
path: spec.template.spec.containers[?(@.name == "sysdig-host-shield")].env[?(@.name == "PASSWORD")]
@@ -116,7 +118,7 @@ tests:
116118
secretKeyRef:
117119
name: existing-secret
118120
key: custom-key
119-
template: templates/host/daemonset.yaml
121+
template: templates/host/daemonset.yaml
120122

121123
- it: Test Local Forwarder secret is not created when disabled
122124
asserts:

0 commit comments

Comments
 (0)