|
17 | 17 | import io.kubernetes.client.openapi.ApiException;
|
18 | 18 | import oracle.weblogic.domain.AuxiliaryImage;
|
19 | 19 | import oracle.weblogic.domain.DomainResource;
|
| 20 | +import oracle.weblogic.kubernetes.actions.impl.AppParams; |
20 | 21 | import oracle.weblogic.kubernetes.actions.impl.primitive.WitParams;
|
21 | 22 | import oracle.weblogic.kubernetes.annotations.IntegrationTest;
|
22 | 23 | import oracle.weblogic.kubernetes.annotations.Namespaces;
|
@@ -184,6 +185,8 @@ class ItMiiAuxiliaryImage {
|
184 | 185 | private static String opNamespace = null;
|
185 | 186 | private static String operatorPodName = null;
|
186 | 187 | private static String oldMiiAuxImageNameInDomain1 = miiAuxiliaryImage1;
|
| 188 | + private static AppParams appParams = defaultAppParams() |
| 189 | + .appArchiveDir(ARCHIVE_DIR + ItMiiAuxiliaryImage.class.getSimpleName()); |
187 | 190 |
|
188 | 191 | /**
|
189 | 192 | * Install Operator. Create a domain using multiple auxiliary images.
|
@@ -238,13 +241,13 @@ public static void initAll(@Namespaces(4) List<String> namespaces) {
|
238 | 241 | createSecretWithUsernamePassword(encryptionSecretName, errorpathDomainNamespace,
|
239 | 242 | "weblogicenc", "weblogicenc");
|
240 | 243 | // build app
|
241 |
| - assertTrue(buildAppArchive(defaultAppParams() |
| 244 | + assertTrue(buildAppArchive(appParams |
242 | 245 | .srcDirList(Collections.singletonList(MII_BASIC_APP_NAME))
|
243 | 246 | .appName(MII_BASIC_APP_NAME)),
|
244 | 247 | String.format("Failed to create app archive for %s", MII_BASIC_APP_NAME));
|
245 | 248 |
|
246 | 249 | // image1 with model files for domain config, ds, app and wdt install files
|
247 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 250 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
248 | 251 |
|
249 | 252 | List<String> modelList = new ArrayList<>();
|
250 | 253 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -334,7 +337,7 @@ void testUpdateDataSourceInDomainUsingAuxiliaryImage() {
|
334 | 337 | "/multi-model-one-ds.20.yaml").toString(), "ORCLCDB",
|
335 | 338 | "dbsvc"), "Can't replace datasource url in the model file");
|
336 | 339 |
|
337 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 340 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
338 | 341 |
|
339 | 342 | List<String> modelList = new ArrayList<>();
|
340 | 343 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -540,7 +543,7 @@ void testCreateDomainNoFilesAtSourceWDTInstallHome() {
|
540 | 543 |
|
541 | 544 | // creating image with no WDT install files
|
542 | 545 |
|
543 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 546 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
544 | 547 |
|
545 | 548 | List<String> modelList = new ArrayList<>();
|
546 | 549 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -597,7 +600,7 @@ void testSourceWDTInstallHomeSetAtMultipleAIs() {
|
597 | 600 | //createAuxiliaryImageWithDomainConfig(miiAuxiliaryImage6, auxiliaryImagePathCustom);
|
598 | 601 |
|
599 | 602 | // admin/managed server name here should match with model yaml
|
600 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 603 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
601 | 604 |
|
602 | 605 | List<String> modelList = new ArrayList<>();
|
603 | 606 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -733,7 +736,7 @@ void testCreateDomainWithConfigMapAndEmptyModelFileDir() {
|
733 | 736 | String domainUid = "testdomain8";
|
734 | 737 | String adminServerPodName = domainUid + "-admin-server";
|
735 | 738 | String managedServerPrefix = domainUid + "-managed-server";
|
736 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 739 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
737 | 740 |
|
738 | 741 | WitParams witParams =
|
739 | 742 | new WitParams()
|
@@ -785,7 +788,7 @@ void testCreateDomainWithEmptyConfigMapWithNoModelFiles() {
|
785 | 788 | String domainUid = "testdomain9";
|
786 | 789 | String adminServerPodName = domainUid + "-admin-server";
|
787 | 790 | String managedServerPrefix = domainUid + "-managed-server";
|
788 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 791 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
789 | 792 |
|
790 | 793 | WitParams witParams =
|
791 | 794 | new WitParams()
|
@@ -967,7 +970,7 @@ void testErrorPathDomainMissingWDTBinary() {
|
967 | 970 | }
|
968 | 971 | OffsetDateTime timestamp = now();
|
969 | 972 |
|
970 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 973 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
971 | 974 |
|
972 | 975 | List<String> modelList = new ArrayList<>();
|
973 | 976 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -1039,7 +1042,7 @@ void testErrorPathDomainMissingDomainConfig() {
|
1039 | 1042 | final String auxiliaryImagePath = "/auxiliary";
|
1040 | 1043 | OffsetDateTime timestamp = now();
|
1041 | 1044 |
|
1042 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1045 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1043 | 1046 |
|
1044 | 1047 | List<String> modelList = new ArrayList<>();
|
1045 | 1048 | modelList.add(MODEL_DIR + "/model.jms2.yaml");
|
@@ -1110,7 +1113,7 @@ void testErrorPathFilePermission() {
|
1110 | 1113 |
|
1111 | 1114 | OffsetDateTime timestamp = now();
|
1112 | 1115 |
|
1113 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1116 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1114 | 1117 |
|
1115 | 1118 | List<String> modelList = new ArrayList<>();
|
1116 | 1119 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -1197,7 +1200,7 @@ void testUpdateWDTVersionUsingMultipleAuxiliaryImages() {
|
1197 | 1200 | createSecretWithUsernamePassword(encryptionSecretName, wdtDomainNamespace,
|
1198 | 1201 | "weblogicenc", "weblogicenc");
|
1199 | 1202 |
|
1200 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1203 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1201 | 1204 |
|
1202 | 1205 | List<String> modelList = new ArrayList<>();
|
1203 | 1206 | modelList.add(MODEL_DIR + "/multi-model-one-ds.20.yaml");
|
@@ -1389,17 +1392,14 @@ void testUpdateApplicationUsingAI() {
|
1389 | 1392 |
|
1390 | 1393 | logger.info("Build an application archive using what is in {0}", appDirList);
|
1391 | 1394 | assertTrue(
|
1392 |
| - buildAppArchive( |
1393 |
| - defaultAppParams() |
1394 |
| - .srcDirList(appDirList)), |
1395 |
| - String.format("Failed to create application archive for %s", |
1396 |
| - MII_BASIC_APP_NAME)); |
| 1395 | + buildAppArchive(appParams.srcDirList(appDirList)), |
| 1396 | + String.format("Failed to create application archive for %s", MII_BASIC_APP_NAME)); |
1397 | 1397 |
|
1398 | 1398 | logger.info("Build the archive list that contains {0}",
|
1399 |
| - String.format("%s/%s.zip", ARCHIVE_DIR, MII_BASIC_APP_NAME)); |
| 1399 | + String.format("%s/%s.zip", appParams.appArchiveDir(), MII_BASIC_APP_NAME)); |
1400 | 1400 | List<String> archiveList =
|
1401 | 1401 | Collections.singletonList(
|
1402 |
| - String.format("%s/%s.zip", ARCHIVE_DIR, MII_BASIC_APP_NAME)); |
| 1402 | + String.format("%s/%s.zip", appParams.appArchiveDir(), MII_BASIC_APP_NAME)); |
1403 | 1403 |
|
1404 | 1404 | List<String> modelList = new ArrayList<>();
|
1405 | 1405 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -1517,7 +1517,7 @@ private void createDomainUsingAuxImageWithCustomWdtModelHomeInstallHome(String w
|
1517 | 1517 | String domainUid,
|
1518 | 1518 | String imageTag) {
|
1519 | 1519 |
|
1520 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1520 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1521 | 1521 |
|
1522 | 1522 | List<String> modelList = new ArrayList<>();
|
1523 | 1523 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
|
0 commit comments