@@ -263,14 +263,32 @@ var _ = Describe("The Openshift Notebook controller", func() {
263
263
"odh-ca-bundle.crt" : "-----BEGIN CERTIFICATE-----\n MIGrMF+gAwIBAgIBATAFBgMrZXAwADAeFw0yNDExMTMyMzI2NTlaFw0yNTExMTMy\n MzI2NTlaMAAwKjAFBgMrZXADIQB/v02zcoIIcuan/8bd7cvrBuCGTuVZBrYr1RdA\n 0k58yzAFBgMrZXADQQBKsL1tkpOZ6NW+zEX3mD7bhmhxtODQHnANMXEXs0aljWrm\n AxDrLdmzsRRYFYxe23OdXhWqPs8SfO8EZWEvXoME\n -----END CERTIFICATE-----" ,
264
264
})
265
265
266
+ serviceCACertBundle := & corev1.ConfigMap {
267
+ ObjectMeta : metav1.ObjectMeta {
268
+ Name : "openshift-service-ca.crt" ,
269
+ Namespace : "default" ,
270
+ // Annotations: map[string]string{
271
+ // "service.beta.openshift.io/inject-cabundle": "true",
272
+ // },
273
+ },
274
+ Data : map [string ]string {
275
+ "service-ca.crt" : "-----BEGIN CERTIFICATE-----\n MIIBATCBtKADAgECAgEBMAUGAytlcDAAMB4XDTI1MDYxNjE2MTg0MVoXDTI2MDYx\n NjE2MTg0MVowADAqMAUGAytlcAMhAP7g8UxhoFPZXQiy4sSbOsLrlXq2RgFTzQOD\n j8O8e9qmo1MwUTAdBgNVHQ4EFgQUTCWpJDtMDVadBlVpkVTiLnCihqMwHwYDVR0j\n BBgwFoAUTCWpJDtMDVadBlVpkVTiLnCihqMwDwYDVR0TAQH/BAUwAwEB/zAFBgMr\n ZXADQQDKpiapbn7ub7/hT7Whad9wbvIY8wXrWojgZXXbWaMQFV8i8GW7QN4w/C1p\n B8i0efvecoLP/mqmXNyl7KgTnC4D\n -----END CERTIFICATE-----" ,
276
+ },
277
+ }
278
+
266
279
// Create the ConfigMap
267
280
Expect (cli .Create (ctx , trustedCACertBundle )).Should (Succeed ())
281
+ Expect (cli .Create (ctx , serviceCACertBundle )).Should (Succeed ())
268
282
defer func () {
269
283
// Clean up the ConfigMap after the test
270
284
if err := cli .Delete (ctx , trustedCACertBundle ); err != nil {
271
285
// Log the error without failing the test
272
286
logger .Info ("Error occurred during deletion of ConfigMap: %v" , err )
273
287
}
288
+ if err := cli .Delete (ctx , serviceCACertBundle ); err != nil {
289
+ // Log the error without failing the test
290
+ logger .Info ("Error occurred during deletion of ConfigMap: %v" , err )
291
+ }
274
292
}()
275
293
276
294
By ("By creating a new Notebook" )
@@ -308,12 +326,12 @@ var _ = Describe("The Openshift Notebook controller", func() {
308
326
Expect (notebook .Spec .Template .Spec .Volumes ).To (ContainElement (expectedVolume ))
309
327
310
328
// Check the content in workbench-trusted-ca-bundle matches what we expect:
311
- // - have 2 certificates there in ca-bundle.crt
312
- // - both certificates are valid
329
+ // - have 3 certificates there in ca-bundle.crt
330
+ // - all certificates are valid
313
331
// TODO(RHOAIENG-15907): adding sleep to reduce flakiness
314
332
time .Sleep (2 * time .Second )
315
333
configMapName := "workbench-trusted-ca-bundle"
316
- checkCertConfigMap (ctx , notebook .Namespace , configMapName , "ca-bundle.crt" , 2 )
334
+ checkCertConfigMap (ctx , notebook .Namespace , configMapName , "ca-bundle.crt" , 3 )
317
335
})
318
336
319
337
})
@@ -537,12 +555,12 @@ var _ = Describe("The Openshift Notebook controller", func() {
537
555
Expect (notebook .Spec .Template .Spec .Volumes ).To (ContainElement (expectedVolume ))
538
556
539
557
// Check the content in workbench-trusted-ca-bundle matches what we expect:
540
- // - have 2 certificates there in ca-bundle.crt
541
- // - both certificates are valid
558
+ // - have 3 certificates there in ca-bundle.crt
559
+ // - all certificates are valid
542
560
// TODO(RHOAIENG-15907): adding sleep to reduce flakiness
543
561
time .Sleep (2 * time .Second )
544
562
configMapName := "workbench-trusted-ca-bundle"
545
- checkCertConfigMap (ctx , notebook .Namespace , configMapName , "ca-bundle.crt" , 2 )
563
+ checkCertConfigMap (ctx , notebook .Namespace , configMapName , "ca-bundle.crt" , 3 )
546
564
})
547
565
})
548
566
0 commit comments