@@ -267,7 +267,7 @@ void testDeleteOperatorButNotDomain() {
267
267
268
268
// delete operator
269
269
logger .info ("Uninstalling operator" );
270
- uninstallOperator (opHelmParams );
270
+ uninstallOperatorAndVerify (opHelmParams );
271
271
cleanUpSA (opNamespace );
272
272
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , opNamespace );
273
273
@@ -349,7 +349,7 @@ void testCreateDeleteCreateOperatorButNotDomain() {
349
349
}
350
350
// delete operator
351
351
logger .info ("Uninstalling operator" );
352
- uninstallOperator (opHelmParams );
352
+ uninstallOperatorAndVerify (opHelmParams );
353
353
354
354
//install second time
355
355
opHelmParams = installOperatorHelmChart (opNamespace , opServiceAccount , false , true , false ,
@@ -375,7 +375,7 @@ void testCreateDeleteCreateOperatorButNotDomain() {
375
375
logger .info ("Domain1 scaled to " + replicaCountDomain1 + " servers" );
376
376
377
377
} finally {
378
- uninstallOperator (op1HelmParams );
378
+ uninstallOperatorAndVerify (op1HelmParams );
379
379
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , opNamespace );
380
380
cleanUpSA (opNamespace );
381
381
if (!isDomain1Running ) {
@@ -490,7 +490,7 @@ void testAddRemoveDomainNameSpacesOnOperator() {
490
490
"operator can still manage domain3, scaling was succeeded for " + managedServerPodName1 );
491
491
492
492
} finally {
493
- uninstallOperator (op1HelmParams );
493
+ uninstallOperatorAndVerify (op1HelmParams );
494
494
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , op2Namespace );
495
495
cleanUpSA (op2Namespace );
496
496
if (!isDomain2Running ) {
@@ -534,8 +534,8 @@ void testCreateSecondOperatorUsingSameOperatorNsNegativeInstall() {
534
534
assertNull (opHelmParam2 ,
535
535
"FAILURE: Helm installs operator in the same namespace as first operator installed " );
536
536
} finally {
537
- uninstallOperator (opHelmParams );
538
- uninstallOperator (op2HelmParams );
537
+ uninstallOperatorAndVerify (opHelmParams );
538
+ uninstallOperatorAndVerify (op2HelmParams );
539
539
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , opNamespace );
540
540
cleanUpSA (opNamespace );
541
541
if (!isDomain1Running ) {
@@ -579,8 +579,8 @@ void testSecondOpSharingSameDomainNamespacesNegativeInstall() {
579
579
expectedError ,"failed" , 0 , op2HelmParams , LIST_STRATEGY , domain2Namespace );
580
580
assertNull (opHelmParam2 , "FAILURE: Helm installs operator in the same namespace as first operator installed " );
581
581
} finally {
582
- uninstallOperator (opHelmParams );
583
- uninstallOperator (op2HelmParams );
582
+ uninstallOperatorAndVerify (opHelmParams );
583
+ uninstallOperatorAndVerify (op2HelmParams );
584
584
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , opNamespace );
585
585
cleanUpSA (opNamespace );
586
586
cleanUpSA (op2Namespace );
@@ -627,9 +627,9 @@ void testSecondOpSharingSameExternalRestPortNegativeInstall() {
627
627
expectedError ,"failed" ,
628
628
externalRestHttpsPort , op2HelmParams , LIST_STRATEGY , domain2Namespace );
629
629
assertNull (opHelmParam2 , "FAILURE: Helm installs operator in the same namespace as first operator installed " );
630
- uninstallOperator (op2HelmParams );
630
+ uninstallOperatorAndVerify (op2HelmParams );
631
631
} finally {
632
- uninstallOperator (opHelmParams );
632
+ uninstallOperatorAndVerify (opHelmParams );
633
633
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , opNamespace );
634
634
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , op2Namespace );
635
635
cleanUpSA (opNamespace );
@@ -660,7 +660,7 @@ void testNotPreCreatedOpNsCreateOperatorNegativeInstall() {
660
660
LIST_STRATEGY , domain2Namespace );
661
661
assertNull (opHelmParam2 , "FAILURE: Helm installs operator in the same namespace as first operator installed " );
662
662
} finally {
663
- uninstallOperator (op2HelmParams );
663
+ uninstallOperatorAndVerify (op2HelmParams );
664
664
}
665
665
}
666
666
@@ -727,7 +727,7 @@ void testCreateWithEmptyDomainNamespaceInstall() {
727
727
--replicaCountDomain2 ;
728
728
logger .info ("Domain2 scaled to " + replicaCountDomain2 + " servers" );
729
729
} finally {
730
- uninstallOperator (op2HelmParams );
730
+ uninstallOperatorAndVerify (op2HelmParams );
731
731
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , op2Namespace );
732
732
cleanUpSA (op2Namespace );
733
733
if (!isDomain2Running ) {
@@ -802,7 +802,7 @@ void testNotPreexistedOpServiceAccountCreateOperatorNegativeInstall() {
802
802
assertNotNull (errorMsg , "Expected error message for missing ServiceAccount not found" );
803
803
} finally {
804
804
//uninstall operator helm chart
805
- uninstallOperator (opHelmParams );
805
+ uninstallOperatorAndVerify (opHelmParams );
806
806
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , op2Namespace );
807
807
cleanUpSA (op2Namespace );
808
808
}
@@ -904,7 +904,7 @@ void testTwoDomainsInSameNameSpaceOnOperator() {
904
904
} catch (Exception ex ) {
905
905
logger .info ("Failed to collect operator log" );
906
906
}
907
- uninstallOperator (op1HelmParams );
907
+ uninstallOperatorAndVerify (op1HelmParams );
908
908
deleteSecret (TEST_IMAGES_REPO_SECRET_NAME , op3Namespace );
909
909
cleanUpSA (op3Namespace );
910
910
}
@@ -1295,4 +1295,17 @@ private void cleanUpDomainSecrets(String domainNamespace) {
1295
1295
}
1296
1296
}
1297
1297
}
1298
+
1299
+ private void uninstallOperatorAndVerify (HelmParams opHelmParams ) {
1300
+
1301
+ logger .info ("Uninstalling operator" );
1302
+ uninstallOperator (opHelmParams );
1303
+
1304
+ String opNamespace = opHelmParams .getNamespace ();
1305
+ // check the operator pod deleted
1306
+ String operatorPodName = assertDoesNotThrow (() -> getOperatorPodName (OPERATOR_RELEASE_NAME , opNamespace ),
1307
+ "Can't get operator's pod name" );
1308
+ checkPodDoesNotExist (operatorPodName , null , opNamespace );
1309
+
1310
+ }
1298
1311
}
0 commit comments