@@ -396,32 +396,6 @@ void testScaleClustersByPatchingDomainResource(Domain domain) {
396
396
}
397
397
}
398
398
399
- /**
400
- * Negative test case for when domain resource attribute domain.spec.adminServer.adminChannelPortForwardingEnabled
401
- * is set to false, the WLS admin console can not be accessed using the forwarded port, like
402
- * http://localhost:localPort/console/login/LoginForm.jsp
403
- */
404
- @ DisabledIfEnvironmentVariable (named = "OKD" , matches = "true" )
405
- @ Test
406
- @ DisplayName ("Forward a local port to admin default and default secure channel port "
407
- + "and verify WLS admin console is not accessible" )
408
- void testPortforwardDisabledInMiiDomain () {
409
- Domain domain = createMiiDomainWithMultiClusters (miiDomainUid + "neg" , miiDomainNamespace , "negativeTest" );
410
- assertDomainNotNull (domain );
411
-
412
- String domainUid = domain .getSpec ().getDomainUid ();
413
- String domainNamespace = domain .getMetadata ().getNamespace ();
414
- final String hostName = "localhost" ;
415
-
416
- String forwardedPortNo = startPortForwardProcess (hostName , domainNamespace , domainUid , ADMIN_SERVER_PORT );
417
- verifyAdminConsoleAccessible (domainNamespace , hostName , forwardedPortNo , false , Boolean .FALSE );
418
-
419
- forwardedPortNo = startPortForwardProcess (hostName , domainNamespace , domainUid , ADMIN_SERVER_SECURE_PORT );
420
- verifyAdminConsoleAccessible (domainNamespace , hostName , forwardedPortNo , true , Boolean .FALSE );
421
-
422
- stopPortForwardProcess (domainNamespace );
423
- }
424
-
425
399
/**
426
400
* Scale cluster using REST API for three different type of domains.
427
401
* i.e. domain-on-pv, domain-in-image and model-in-image
@@ -923,13 +897,7 @@ public void tearDownAll() {
923
897
* @return oracle.weblogic.domain.Domain objects
924
898
*/
925
899
private static Domain createMiiDomainWithMultiClusters (String domainUid ,
926
- String domainNamespace ,
927
- String ... args ) {
928
-
929
- boolean adminChannelPortForwardingEnabled = (args .length == 0 ) ? true : false ;
930
- logger .info ("Creating a Domain with adminChannelPortForwardingEnabled = {0}" ,
931
- adminChannelPortForwardingEnabled );
932
-
900
+ String domainNamespace ) {
933
901
// admin/managed server name here should match with WDT model yaml file
934
902
String adminServerPodName = domainUid + "-" + ADMIN_SERVER_NAME_BASE ;
935
903
@@ -939,17 +907,15 @@ private static Domain createMiiDomainWithMultiClusters(String domainUid,
939
907
createOcirRepoSecret (domainNamespace );
940
908
941
909
String adminSecretName = "weblogic-credentials" ;
942
- if (adminChannelPortForwardingEnabled ) {
943
- // create secret for admin credentials
944
- logger .info ("Creating secret for admin credentials" );
945
- createSecretWithUsernamePassword (adminSecretName , domainNamespace ,
946
- ADMIN_USERNAME_DEFAULT , ADMIN_PASSWORD_DEFAULT );
947
-
948
- // create encryption secret
949
- logger .info ("Creating encryption secret" );
950
- createSecretWithUsernamePassword (encryptionSecretName , domainNamespace ,
951
- "weblogicenc" , "weblogicenc" );
952
- }
910
+ // create secret for admin credentials
911
+ logger .info ("Creating secret for admin credentials" );
912
+ createSecretWithUsernamePassword (adminSecretName , domainNamespace ,
913
+ ADMIN_USERNAME_DEFAULT , ADMIN_PASSWORD_DEFAULT );
914
+
915
+ // create encryption secret
916
+ logger .info ("Creating encryption secret" );
917
+ createSecretWithUsernamePassword (encryptionSecretName , domainNamespace ,
918
+ "weblogicenc" , "weblogicenc" );
953
919
954
920
// construct the cluster list used for domain custom resource
955
921
List <Cluster > clusterList = new ArrayList <>();
@@ -994,7 +960,7 @@ private static Domain createMiiDomainWithMultiClusters(String domainUid,
994
960
.limits (resourceLimit )))
995
961
.adminServer (new AdminServer ()
996
962
.serverStartState ("RUNNING" )
997
- .adminChannelPortForwardingEnabled (adminChannelPortForwardingEnabled )
963
+ .adminChannelPortForwardingEnabled (true )
998
964
.adminService (new AdminService ()
999
965
.addChannelsItem (new Channel ()
1000
966
.channelName ("default-secure" )
0 commit comments