72
72
import static oracle .weblogic .kubernetes .actions .TestActions .defaultWitParams ;
73
73
import static oracle .weblogic .kubernetes .actions .TestActions .deleteDomainCustomResource ;
74
74
import static oracle .weblogic .kubernetes .actions .TestActions .deleteImage ;
75
- import static oracle .weblogic .kubernetes .actions .TestActions .deleteNamespace ;
76
- import static oracle .weblogic .kubernetes .actions .TestActions .deleteServiceAccount ;
77
75
import static oracle .weblogic .kubernetes .actions .TestActions .dockerLogin ;
78
76
import static oracle .weblogic .kubernetes .actions .TestActions .dockerPush ;
79
77
import static oracle .weblogic .kubernetes .actions .TestActions .execCommand ;
80
78
import static oracle .weblogic .kubernetes .actions .TestActions .getOperatorImageName ;
81
79
import static oracle .weblogic .kubernetes .actions .TestActions .installOperator ;
82
- import static oracle .weblogic .kubernetes .actions .TestActions .uninstallOperator ;
83
80
import static oracle .weblogic .kubernetes .actions .TestActions .upgradeOperator ;
84
81
import static oracle .weblogic .kubernetes .assertions .TestAssertions .doesImageExist ;
85
82
import static oracle .weblogic .kubernetes .assertions .TestAssertions .domainExists ;
@@ -508,7 +505,10 @@ public void testCreateMiiDomainSameDomainUidDiffNS() {
508
505
}
509
506
510
507
511
- private void tearDown () {
508
+ // This method is needed in this test class, since the cleanup util
509
+ // won't cleanup the images.
510
+ @ AfterAll
511
+ void tearDown () {
512
512
513
513
// Delete domain custom resource
514
514
logger .info ("Delete domain custom resource in namespace {0}" , domainNamespace );
@@ -533,51 +533,6 @@ private void tearDown() {
533
533
534
534
}
535
535
536
- /**
537
- * Uninstall Operator, delete service account, domain namespace and
538
- * operator namespace.
539
- */
540
- @ AfterAll
541
- public void tearDownAll () {
542
- tearDown ();
543
- // uninstall operator release
544
- logger .info ("Uninstall Operator in namespace {0}" , opNamespace );
545
- if (opHelmParams != null ) {
546
- uninstallOperator (opHelmParams );
547
- }
548
- // Delete service account from unique opNamespace
549
- logger .info ("Delete service account in namespace {0}" , opNamespace );
550
- if (serviceAccount != null ) {
551
- assertDoesNotThrow (() -> deleteServiceAccount (serviceAccount .getMetadata ().getName (),
552
- serviceAccount .getMetadata ().getNamespace ()),
553
- "deleteServiceAccount failed with ApiException" );
554
- }
555
- // Delete domain namespaces
556
- logger .info ("Deleting domain namespace {0}" , domainNamespace );
557
- if (domainNamespace != null ) {
558
- assertDoesNotThrow (() -> deleteNamespace (domainNamespace ),
559
- "deleteNamespace failed with ApiException" );
560
- logger .info ("Deleted namespace: " + domainNamespace );
561
- }
562
-
563
- // Delete domain namespaces
564
- logger .info ("Deleting domain namespace {0}" , domainNamespace1 );
565
- if (domainNamespace1 != null ) {
566
- assertDoesNotThrow (() -> deleteNamespace (domainNamespace1 ),
567
- "deleteNamespace failed with ApiException" );
568
- logger .info ("Deleted namespace: " + domainNamespace1 );
569
- }
570
-
571
- // Delete opNamespace
572
- logger .info ("Deleting Operator namespace {0}" , opNamespace );
573
- if (opNamespace != null ) {
574
- assertDoesNotThrow (() -> deleteNamespace (opNamespace ),
575
- "deleteNamespace failed with ApiException" );
576
- logger .info ("Deleted namespace: " + opNamespace );
577
- }
578
-
579
- }
580
-
581
536
private String createImageAndVerify () {
582
537
// create unique image name with date
583
538
DateFormat dateFormat = new SimpleDateFormat ("yyyy-MM-dd" );
0 commit comments