Commit 55089ce 1 parent d8ed164 commit 55089ce Copy full SHA for 55089ce
File tree 2 files changed +31
-1
lines changed
charts/kubewarden-controller/tests
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ kubernetesProvider:
29
29
data :
30
30
tls.crt : " dGxzLmNydA==" # "tls.crt" in base64
31
31
tls.key : " dGxzLmtleQ==" # "tls.key" in base64
32
+ - kind : Secret
33
+ apiVersion : v1
34
+ metadata :
35
+ name : kubewarden-audit-scanner-client-cert
36
+ namespace : kubewarden
37
+ data :
38
+ tls.crt : " dGxzLmNydA==" # "tls.crt" in base64
39
+ tls.key : " dGxzLmtleQ==" # "tls.key" in base64
32
40
tests :
33
41
- it : " should reuse the existing CA certificate"
34
42
documentSelector :
47
55
path : data["old-ca.crt"]
48
56
value : " old-ca.crt"
49
57
decodeBase64 : true
50
- - it : " should reuse the existing leaf certificate"
58
+ - it : " should reuse the existing leaf certificate (webhook server) "
51
59
documentSelector :
52
60
path : metadata.name
53
61
value : kubewarden-webhook-server-cert
@@ -60,6 +68,19 @@ tests:
60
68
path : data["tls.key"]
61
69
value : " tls.key"
62
70
decodeBase64 : true
71
+ - it : " should reuse the existing leaf certificate (audit-scanner)"
72
+ documentSelector :
73
+ path : metadata.name
74
+ value : kubewarden-audit-scanner-client-cert
75
+ asserts :
76
+ - equal :
77
+ path : data["tls.crt"]
78
+ value : " tls.crt"
79
+ decodeBase64 : true
80
+ - equal :
81
+ path : data["tls.key"]
82
+ value : " tls.key"
83
+ decodeBase64 : true
63
84
- it : " should inject the caBundle (ca + old ca) into the webhook configurations"
64
85
documentSelector :
65
86
path : apiVersion
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ tests:
22
22
path : data["tls.crt"]
23
23
- isNotNullOrEmpty :
24
24
path : data["tls.key"]
25
+ - it : " should generate a leaf certificate and store it in the kubewarden-audit-scanner-client-cert secret"
26
+ documentSelector :
27
+ path : metadata.name
28
+ value : kubewarden-audit-scanner-client-cert
29
+ asserts :
30
+ - isNotNullOrEmpty :
31
+ path : data["tls.crt"]
32
+ - isNotNullOrEmpty :
33
+ path : data["tls.key"]
25
34
- it : " should inject the caBundle into the webhook configurations"
26
35
documentSelector :
27
36
path : apiVersion
You can’t perform that action at this time.
0 commit comments