@@ -536,7 +536,41 @@ public void testCreateChartWithInvalidAttributesNegativeInstall() throws Excepti
536
536
}
537
537
538
538
/**
539
- * Helm will install the operator with empty target domains namespaces
539
+ * Helm will install the operator with no override for domainNamespaces, resulting in the use of
540
+ * "default" as the target namespace. NOTE: This test must not override domainNamespaces with an
541
+ * empty set or the operator will fail when it performs security checks because the RoleBinding
542
+ * for the weblogic-operator-rolebinding-namespace will be missing. Rather, just remove the
543
+ * domainNamespaces override completely so that we pick up the Operator defaults specified in the
544
+ * Operator helm chart values.yaml.
545
+ *
546
+ * @throws Exception
547
+ */
548
+ @ Test
549
+ public void testCreateWithMissingTargetDomainInstall () throws Exception {
550
+ Assume .assumeFalse (QUICKTEST );
551
+ String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
552
+ logTestBegin (testMethodName );
553
+ Operator operator = null ;
554
+ try {
555
+ Map <String , Object > operatorMap = TestUtils .createOperatorMap (number , true );
556
+ operatorMap .remove ("domainNamespaces" );
557
+ operator = new Operator (operatorMap , RESTCertType .SELF_SIGNED );
558
+ operator .callHelmInstall ();
559
+ operator .verifyOperatorReady ();
560
+
561
+ } finally {
562
+ number ++;
563
+ if (operator != null ) {
564
+ operator .destroy ();
565
+ }
566
+ }
567
+ logger .info ("SUCCESS - " + testMethodName );
568
+ }
569
+
570
+ /**
571
+ * Helm will install the operator with empty string as target domains namespaces. This is
572
+ * equivalent to what the QuickStart guide does when it installs the operator with ' --set
573
+ * "domainNamespaces={}" '
540
574
*
541
575
* @throws Exception
542
576
*/
@@ -549,6 +583,7 @@ public void testCreateWithEmptyTargetDomainInstall() throws Exception {
549
583
try {
550
584
Map <String , Object > operatorMap = TestUtils .createOperatorMap (number , true );
551
585
ArrayList <String > targetDomainsNS = new ArrayList <String >();
586
+ targetDomainsNS .add ("" );
552
587
operatorMap .replace ("domainNamespaces" , targetDomainsNS );
553
588
operator = new Operator (operatorMap , RESTCertType .SELF_SIGNED );
554
589
operator .callHelmInstall ();
0 commit comments