@@ -122,6 +122,65 @@ tests:
122
122
name : codefresh-tls-certs
123
123
readOnly : true
124
124
125
+ - it : volume in pre-delete-hook - chart created secret
126
+ template : ' hooks/pre-uninstall/delete-runtime-from-platform.yaml'
127
+ values :
128
+ - ./values/mandatory-values.yaml
129
+ set :
130
+ global.codefresh.tls.caCerts.secret.create : true
131
+ global.codefresh.tls.caCerts.secret.content : |
132
+ -----BEGIN CERTIFICATE-----
133
+ ... encoded certificate data here ...
134
+ -----END CERTIFICATE-----
135
+ asserts :
136
+ - contains :
137
+ path : spec.template.spec.volumes
138
+ content :
139
+ name : codefresh-tls-certs
140
+ secret :
141
+ secretName : codefresh-tls-certs
142
+ defaultMode : 420
143
+ optional : true
144
+ - contains :
145
+ path : spec.template.spec.containers[0].volumeMounts
146
+ content :
147
+ mountPath : /app/config/codefresh-tls-certs
148
+ name : codefresh-tls-certs
149
+ readOnly : true
150
+
151
+ - it : volume in pre-delete-hook - no tls
152
+ template : ' hooks/pre-uninstall/delete-runtime-from-platform.yaml'
153
+ values :
154
+ - ./values/mandatory-values.yaml
155
+ asserts :
156
+ - isNull :
157
+ path : spec.template.spec.volumes
158
+ - isNull :
159
+ path : spec.template.spec.containers[0].volumeMounts
160
+
161
+ - it : volume in pre-delete-hook - secret ref
162
+ template : ' hooks/pre-uninstall/delete-runtime-from-platform.yaml'
163
+ values :
164
+ - ./values/mandatory-values.yaml
165
+ set :
166
+ global.codefresh.tls.caCerts.secretKeyRef.name : my-secret
167
+ global.codefresh.tls.caCerts.secretKeyRef.key : my-key
168
+ asserts :
169
+ - contains :
170
+ path : spec.template.spec.volumes
171
+ content :
172
+ name : codefresh-tls-certs
173
+ secret :
174
+ secretName : my-secret
175
+ defaultMode : 420
176
+ optional : true
177
+ - contains :
178
+ path : spec.template.spec.containers[0].volumeMounts
179
+ content :
180
+ mountPath : /app/config/codefresh-tls-certs
181
+ name : codefresh-tls-certs
182
+ readOnly : true
183
+
125
184
- it : environment variable in pre-delete hook - secret ref
126
185
template : ' hooks/pre-uninstall/delete-runtime-from-platform.yaml'
127
186
values :
@@ -134,7 +193,7 @@ tests:
134
193
path : spec.template.spec.containers[0].env
135
194
content :
136
195
name : SSL_CERT_FILE
137
- value : /app/config/my-secret /my-key
196
+ value : /app/config/codefresh-tls-certs /my-key
138
197
139
198
- it : environment variable in pre-delete hook - chart created secret
140
199
template : ' hooks/pre-uninstall/delete-runtime-from-platform.yaml'
0 commit comments