@@ -553,14 +553,6 @@ public void testCreateWithEmptyTargetDomainInstall() throws Exception {
553
553
logger .info ("SUCCESS - " + testMethodName );
554
554
}
555
555
556
- private void upgradeOperator (Operator operator , String upgradeSet ) throws Exception {
557
- Assume .assumeFalse (QUICKTEST );
558
- String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
559
- logTestBegin (testMethodName );
560
- operator .callHelmUpgrade (upgradeSet );
561
- logger .info ("SUCCESS - " + testMethodName );
562
- }
563
-
564
556
/**
565
557
* Helm installs the operator with default target domains namespaces
566
558
*
@@ -593,7 +585,7 @@ public void testCreateWithDefaultTargetDomainInstall() throws Exception {
593
585
* Create operator and verify its deployed successfully. Create domain1 and verify domain is
594
586
* started. Call helm upgrade to add domainnew to manage, verify both domains are managed by
595
587
* operator Call helm upgrade to remove first domain from operator target domains, verify it can't
596
- * not be managed by operator anymore Delete operator and make sure domainnew is still functional
588
+ * not be managed by operator anymore
597
589
*
598
590
* @throws Exception
599
591
*/
@@ -650,14 +642,10 @@ public void testAddRemoveDomainUpdateOperatorHC() throws Exception {
650
642
.contains ("Response {\" status\" :404,\" detail\" :\" /operator/latest/domains/test" + number ))
651
643
throw new RuntimeException (
652
644
"FAILURE: Exception does not report the expected error message " + ex .getMessage ());
653
- logger .info ("Deleting operator to check that domain functionality is not effected" );
654
- operator .destroy ();
655
- operator = null ;
656
- Thread .sleep (20 * 1000 );
657
- domainnew .testWlsLivenessProbe ();
658
- testCompletedSuccessfully = true ;
645
+
646
+ testCompletedSuccessfully = true ;
659
647
} finally {
660
- if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully )) domain .destroy ( );
648
+ if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully )) cleanupDomainResources ( domain .getDomainUid () );
661
649
if (domainnew != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully ))
662
650
domainnew .destroy ();
663
651
@@ -669,4 +657,50 @@ public void testAddRemoveDomainUpdateOperatorHC() throws Exception {
669
657
670
658
logger .info ("SUCCESS - " + testMethodName );
671
659
}
660
+ /**
661
+ * Create operator and verify its deployed successfully. Create domain1 and verify domain is
662
+ * started. Delete operator and make sure domain1 is still functional
663
+ *
664
+ * @throws Exception
665
+ */
666
+ @ Test
667
+ public void testDeleteOperatorButNotDomain () throws Exception {
668
+ Assume .assumeFalse (QUICKTEST );
669
+ String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
670
+ logTestBegin (testMethodName );
671
+
672
+ logger .info ("Creating Operator & waiting for the script to complete execution" );
673
+ // create operator
674
+
675
+ Operator operator = null ;
676
+ Domain domain = null ;
677
+ boolean testCompletedSuccessfully = false ;
678
+ try {
679
+ Map <String , Object > operatorMap = TestUtils .createOperatorMap (number , true );
680
+ operator = new Operator (operatorMap , RESTCertType .SELF_SIGNED );
681
+ operator .callHelmInstall ();
682
+ domain = TestUtils .createDomain (TestUtils .createDomainMap (number ));
683
+ domain .verifyDomainCreated ();
684
+ testAdminT3Channel (domain );
685
+ TestUtils .renewK8sClusterLease (getProjectRoot (), getLeaseId ());
686
+ logger .info ("verify that domain is managed by operator" );
687
+ operator .verifyDomainExists (domain .getDomainUid ());
688
+ logger .info ("Deleting operator to check that domain functionality is not effected" );
689
+ operator .destroy ();
690
+ operator = null ;
691
+ Thread .sleep (20 * 1000 );
692
+ domain .testWlsLivenessProbe ();
693
+ testCompletedSuccessfully = true ;
694
+ } finally {
695
+ if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully ))
696
+ cleanupDomainResources (domain .getDomainUid ());
697
+
698
+ if (operator != null ) {
699
+ operator .destroy ();
700
+ }
701
+ number ++;
702
+ }
703
+
704
+ logger .info ("SUCCESS - " + testMethodName );
705
+ }
672
706
}
0 commit comments