|
16 | 16 | import io.kubernetes.client.openapi.ApiException;
|
17 | 17 | import oracle.weblogic.domain.AuxiliaryImage;
|
18 | 18 | import oracle.weblogic.domain.DomainResource;
|
| 19 | +import oracle.weblogic.kubernetes.actions.impl.AppParams; |
19 | 20 | import oracle.weblogic.kubernetes.actions.impl.primitive.WitParams;
|
20 | 21 | import oracle.weblogic.kubernetes.annotations.IntegrationTest;
|
21 | 22 | import oracle.weblogic.kubernetes.annotations.Namespaces;
|
@@ -176,6 +177,9 @@ class ItMiiAuxiliaryImage {
|
176 | 177 | private static String encryptionSecretName = "encryptionsecret";
|
177 | 178 | private static String opNamespace = null;
|
178 | 179 | private static String operatorPodName = null;
|
| 180 | + private static String oldMiiAuxImageNameInDomain1 = miiAuxiliaryImage1; |
| 181 | + private static AppParams appParams = defaultAppParams() |
| 182 | + .appArchiveDir(ARCHIVE_DIR + ItMiiAuxiliaryImage.class.getSimpleName()); |
179 | 183 |
|
180 | 184 | /**
|
181 | 185 | * Install Operator. Create a domain using multiple auxiliary images.
|
@@ -230,13 +234,13 @@ public static void initAll(@Namespaces(4) List<String> namespaces) {
|
230 | 234 | createSecretWithUsernamePassword(encryptionSecretName, errorpathDomainNamespace,
|
231 | 235 | "weblogicenc", "weblogicenc");
|
232 | 236 | // build app
|
233 |
| - assertTrue(buildAppArchive(defaultAppParams() |
| 237 | + assertTrue(buildAppArchive(appParams |
234 | 238 | .srcDirList(Collections.singletonList(MII_BASIC_APP_NAME))
|
235 | 239 | .appName(MII_BASIC_APP_NAME)),
|
236 | 240 | String.format("Failed to create app archive for %s", MII_BASIC_APP_NAME));
|
237 | 241 |
|
238 | 242 | // image1 with model files for domain config, ds, app and wdt install files
|
239 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 243 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
240 | 244 |
|
241 | 245 | List<String> modelList = new ArrayList<>();
|
242 | 246 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -326,7 +330,7 @@ void testUpdateDataSourceInDomainUsingAuxiliaryImage() {
|
326 | 330 | "/multi-model-one-ds.20.yaml").toString(), "ORCLCDB",
|
327 | 331 | "dbsvc"), "Can't replace datasource url in the model file");
|
328 | 332 |
|
329 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 333 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
330 | 334 |
|
331 | 335 | List<String> modelList = new ArrayList<>();
|
332 | 336 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -534,7 +538,7 @@ void testCreateDomainNoFilesAtSourceWDTInstallHome() {
|
534 | 538 |
|
535 | 539 | // creating image with no WDT install files
|
536 | 540 |
|
537 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 541 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
538 | 542 |
|
539 | 543 | List<String> modelList = new ArrayList<>();
|
540 | 544 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -591,7 +595,7 @@ void testSourceWDTInstallHomeSetAtMultipleAIs() {
|
591 | 595 | //createAuxiliaryImageWithDomainConfig(miiAuxiliaryImage6, auxiliaryImagePathCustom);
|
592 | 596 |
|
593 | 597 | // admin/managed server name here should match with model yaml
|
594 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 598 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
595 | 599 |
|
596 | 600 | List<String> modelList = new ArrayList<>();
|
597 | 601 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -727,7 +731,7 @@ void testCreateDomainWithConfigMapAndEmptyModelFileDir() {
|
727 | 731 | String domainUid = "testdomain8";
|
728 | 732 | String adminServerPodName = domainUid + "-admin-server";
|
729 | 733 | String managedServerPrefix = domainUid + "-managed-server";
|
730 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 734 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
731 | 735 |
|
732 | 736 | WitParams witParams =
|
733 | 737 | new WitParams()
|
@@ -779,7 +783,7 @@ void testCreateDomainWithEmptyConfigMapWithNoModelFiles() {
|
779 | 783 | String domainUid = "testdomain9";
|
780 | 784 | String adminServerPodName = domainUid + "-admin-server";
|
781 | 785 | String managedServerPrefix = domainUid + "-managed-server";
|
782 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 786 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
783 | 787 |
|
784 | 788 | WitParams witParams =
|
785 | 789 | new WitParams()
|
@@ -965,7 +969,7 @@ void testErrorPathDomainMissingWDTBinary() {
|
965 | 969 | }
|
966 | 970 | OffsetDateTime timestamp = now();
|
967 | 971 |
|
968 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 972 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
969 | 973 |
|
970 | 974 | List<String> modelList = new ArrayList<>();
|
971 | 975 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -1037,7 +1041,7 @@ void testErrorPathDomainMissingDomainConfig() {
|
1037 | 1041 | final String auxiliaryImagePath = "/auxiliary";
|
1038 | 1042 | OffsetDateTime timestamp = now();
|
1039 | 1043 |
|
1040 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1044 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1041 | 1045 |
|
1042 | 1046 | List<String> modelList = new ArrayList<>();
|
1043 | 1047 | modelList.add(MODEL_DIR + "/model.jms2.yaml");
|
@@ -1108,7 +1112,7 @@ void testErrorPathFilePermission() {
|
1108 | 1112 |
|
1109 | 1113 | OffsetDateTime timestamp = now();
|
1110 | 1114 |
|
1111 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1115 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1112 | 1116 |
|
1113 | 1117 | List<String> modelList = new ArrayList<>();
|
1114 | 1118 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
@@ -1195,7 +1199,7 @@ void testUpdateWDTVersionUsingMultipleAuxiliaryImages() {
|
1195 | 1199 | createSecretWithUsernamePassword(encryptionSecretName, wdtDomainNamespace,
|
1196 | 1200 | "weblogicenc", "weblogicenc");
|
1197 | 1201 |
|
1198 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1202 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1199 | 1203 |
|
1200 | 1204 | List<String> modelList = new ArrayList<>();
|
1201 | 1205 | modelList.add(MODEL_DIR + "/multi-model-one-ds.20.yaml");
|
@@ -1466,7 +1470,7 @@ private void createDomainUsingAuxImageWithCustomWdtModelHomeInstallHome(String w
|
1466 | 1470 | String domainUid,
|
1467 | 1471 | String imageTag) {
|
1468 | 1472 |
|
1469 |
| - List<String> archiveList = Collections.singletonList(ARCHIVE_DIR + "/" + MII_BASIC_APP_NAME + ".zip"); |
| 1473 | + List<String> archiveList = Collections.singletonList(appParams.appArchiveDir() + "/" + MII_BASIC_APP_NAME + ".zip"); |
1470 | 1474 |
|
1471 | 1475 | List<String> modelList = new ArrayList<>();
|
1472 | 1476 | modelList.add(MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE);
|
|
0 commit comments