|
49 | 49 | import oracle.weblogic.kubernetes.utils.BuildApplication; |
50 | 50 | import oracle.weblogic.kubernetes.utils.ExecResult; |
51 | 51 | import oracle.weblogic.kubernetes.utils.OracleHttpClient; |
| 52 | +import oracle.weblogic.kubernetes.utils.TestUtils; |
52 | 53 | import org.awaitility.core.ConditionEvaluationListener; |
53 | 54 | import org.awaitility.core.ConditionFactory; |
54 | 55 | import org.awaitility.core.EvaluatedCondition; |
|
89 | 90 | import static oracle.weblogic.kubernetes.actions.ActionConstants.RESOURCE_DIR; |
90 | 91 | import static oracle.weblogic.kubernetes.actions.ActionConstants.WORK_DIR; |
91 | 92 | import static oracle.weblogic.kubernetes.actions.TestActions.deleteSecret; |
| 93 | +import static oracle.weblogic.kubernetes.actions.TestActions.dockerTag; |
92 | 94 | import static oracle.weblogic.kubernetes.actions.TestActions.execCommand; |
93 | 95 | import static oracle.weblogic.kubernetes.actions.TestActions.getCurrentIntrospectVersion; |
94 | 96 | import static oracle.weblogic.kubernetes.actions.TestActions.getDomainCustomResource; |
|
118 | 120 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createRouteForOKD; |
119 | 121 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createSecretForBaseImages; |
120 | 122 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createSecretWithUsernamePassword; |
| 123 | +import static oracle.weblogic.kubernetes.utils.CommonTestUtils.dockerLoginAndPushImageToRegistry; |
121 | 124 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getExternalServicePodName; |
122 | 125 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getIntrospectJobName; |
123 | 126 | import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getPodCreationTime; |
@@ -159,9 +162,7 @@ public class ItIntrospectVersion { |
159 | 162 | private static String nginxNamespace = null; |
160 | 163 | private static int nodeportshttp; |
161 | 164 | private static HelmParams nginxHelmParams = null; |
162 | | - private static String imageUpdate = KIND_REPO != null ? KIND_REPO |
163 | | - + (WEBLOGIC_IMAGE_NAME + ":" + WLS_UPDATE_IMAGE_TAG).substring(TestConstants.BASE_IMAGES_REPO.length() + 1) |
164 | | - : WEBLOGIC_IMAGE_NAME + ":" + WLS_UPDATE_IMAGE_TAG; |
| 165 | + |
165 | 166 | private final String wlSecretName = "weblogic-credentials"; |
166 | 167 |
|
167 | 168 | private static String adminSvcExtHost = null; |
@@ -967,8 +968,10 @@ public void testCreateNewCluster() { |
967 | 968 |
|
968 | 969 | /** |
969 | 970 | * Modify the domain scope property |
970 | | - * From: "image: container-registry.oracle.com/middleware/weblogic:12.2.1.4" to |
971 | | - * To: "image: container-registry.oracle.com/middleware/weblogic:14.1.1.0-11" |
| 971 | + * From: "image: container-registry.oracle.com/middleware/weblogic:ImageTagBeingUsed" to |
| 972 | + * To: "image: container-registry.oracle.com/middleware/weblogic:DateAndTimeStamp" |
| 973 | + * e.g, From ""image: container-registry.oracle.com/middleware/weblogic:12.2.1.4" |
| 974 | + * To: "image:container-registry.oracle.com/middleware/weblogic:2021-07-08-162571383699" |
972 | 975 | * Verify all the pods are restarted and back to ready state |
973 | 976 | * Verify the admin server is accessible and cluster members are healthy |
974 | 977 | * This test will be skipped if the image tag is the latest WebLogic image tag |
@@ -1008,6 +1011,13 @@ public void testUpdateImageName() { |
1008 | 1011 | logger.info("Currently the image name used for the domain is: {0}", imageName); |
1009 | 1012 |
|
1010 | 1013 | //change image name to imageUpdate |
| 1014 | + String imageTag = TestUtils.getDateAndTimeStamp(); |
| 1015 | + String imageUpdate = KIND_REPO != null ? KIND_REPO |
| 1016 | + + (WEBLOGIC_IMAGE_NAME + ":" + imageTag).substring(TestConstants.BASE_IMAGES_REPO.length() + 1) |
| 1017 | + : WEBLOGIC_IMAGE_NAME + ":" + imageTag; |
| 1018 | + dockerTag(imageName, imageUpdate); |
| 1019 | + dockerLoginAndPushImageToRegistry(imageUpdate); |
| 1020 | + |
1011 | 1021 | StringBuffer patchStr = null; |
1012 | 1022 | patchStr = new StringBuffer("[{"); |
1013 | 1023 | patchStr.append("\"op\": \"replace\",") |
|
0 commit comments