77import java .io .FileOutputStream ;
88import java .io .IOException ;
99import java .nio .file .Path ;
10+ import java .nio .file .Paths ;
1011import java .util .ArrayList ;
1112import java .util .Collections ;
1213import java .util .List ;
5152import static oracle .weblogic .kubernetes .utils .ImageUtils .createBaseRepoSecret ;
5253import static oracle .weblogic .kubernetes .utils .ImageUtils .createTestRepoSecret ;
5354import static oracle .weblogic .kubernetes .utils .OperatorUtils .installAndVerifyOperator ;
54- import static oracle .weblogic .kubernetes .utils .PersistentVolumeUtils .createPVHostPathDir ;
5555import static oracle .weblogic .kubernetes .utils .SecretUtils .createOpsswalletpasswordSecret ;
5656import static oracle .weblogic .kubernetes .utils .SecretUtils .createSecretWithUsernamePassword ;
5757import static oracle .weblogic .kubernetes .utils .ThreadSafeLogger .getLogger ;
@@ -75,21 +75,12 @@ public class ItFmwDomainInPvUserCreateRcu {
7575 private static final String RCUSCHEMAPREFIX = "jrfdomainpv" ;
7676 private static final String ORACLEDBURLPREFIX = "oracledb." ;
7777 private static String ORACLEDBSUFFIX = null ;
78- private static final String RCUSYSUSERNAME = "sys" ;
79- private static final String RCUSYSPASSWORD = "Oradoc_db1" ;
80- private static final String RCUSCHEMAUSERNAME = "myrcuuser" ;
8178 private static final String RCUSCHEMAPASSWORD = "Oradoc_db1" ;
8279
8380 private static String dbUrl = null ;
8481 private static LoggingFacade logger = null ;
8582 private static String DOMAINHOMEPREFIX = null ;
8683 private static final String domainUid = "domainonpv-userrcu" ;
87- private static final String clusterName = "cluster-1" ;
88- private static final String adminServerName = "admin-server" ;
89- private static final String managedServerNameBase = "managed-server" ;
90- private static final String adminServerPodName = domainUid + "-" + adminServerName ;
91- private static final String managedServerPodNamePrefix = domainUid + "-" + managedServerNameBase ;
92- private static final int managedServerPort = 8001 ;
9384 private static final String miiAuxiliaryImage1Tag = "jrf1" + MII_BASIC_IMAGE_TAG ;
9485 private final String adminSecretName = domainUid + "-weblogic-credentials" ;
9586 private final String rcuaccessSecretName = domainUid + "-rcu-credentials" ;
@@ -170,7 +161,6 @@ RCUSCHEMAPREFIX, dbNamespace, getNextFreePort(), dbUrl, dbListenerPort),
170161 @ DisplayName ("Create a FMW domain on PV when user per-creates RCU" )
171162 void testFmwDomainOnPvUserCreatesRCU () {
172163
173- final int t3ChannelPort = getNextFreePort ();
174164 // create a model property file
175165 File fmwModelPropFile = createWdtPropertyFile ();
176166
@@ -228,15 +218,12 @@ void testFmwDomainOnPvUserCreatesRCU() {
228218 domainCreationImage =
229219 new DomainCreationImage ().image (MII_AUXILIARY_IMAGE_NAME + ":" + miiAuxiliaryImage1Tag );
230220
231- String clusterName = "cluster-1" ;
232- pvHostPath = getHostPath (pvName , this .getClass ().getSimpleName ());
233- 234221 // create a domain custom resource configuration object
235222 logger .info ("Creating domain custom resource with pvName: {0}, hostPath: {1}" , pvName , pvHostPath );
236223 DomainResource domain = createDomainResourceSimplifyJrfPv (
237224 domainUid , domainNamespace , adminSecretName ,
238- TEST_IMAGES_REPO_SECRET_NAME ,encryptionSecretName ,
239- pvHostPath , rcuaccessSecretName ,
225+ TEST_IMAGES_REPO_SECRET_NAME ,
226+ rcuaccessSecretName ,
240227 opsswalletpassSecretName , null ,
241228 pvName , pvcName , Collections .singletonList (domainCreationImage ));
242229
@@ -261,15 +248,15 @@ void testFmwDomainOnPvUserProvideOpss() {
261248 logger .info ("Deleting domain custom resource with namespace: {0}, domainUid {1}" , domainNamespace , domainUid );
262249 deleteDomainResource (domainNamespace , domainUid );
263250 try {
264- deleteDirectory (hostPVPath .toFile ());
251+ deleteDirectory (Paths . get ( "/share" ) .toFile ());
265252 } catch (IOException ioe ) {
266253 logger .severe ("Failed to cleanup the pv directory " + pvHostPath , ioe );
267254 }
268255 logger .info ("Creating domain custom resource with pvName: {0}, hostPath: {1}" , pvName , pvHostPath );
269256 DomainResource domain = createDomainResourceSimplifyJrfPv (
270257 domainUid , domainNamespace , adminSecretName ,
271- TEST_IMAGES_REPO_SECRET_NAME ,encryptionSecretName ,
272- pvHostPath , rcuaccessSecretName ,
258+ TEST_IMAGES_REPO_SECRET_NAME ,
259+ rcuaccessSecretName ,
273260 opsswalletpassSecretName , opsswalletfileSecretName ,
274261 pvName , pvcName , Collections .singletonList (domainCreationImage ));
275262 // create a domain custom resource and verify domain is created
@@ -301,10 +288,5 @@ private File createWdtPropertyFile() {
301288
302289 return domainPropertiesFile ;
303290 }
304- 305- private String getHostPath (String pvName , String className ) {
306- hostPVPath = createPVHostPathDir (pvName , className );
307- return hostPVPath .toString ();
308- }
309- 291+ 310292}
0 commit comments