Skip to content

Commit 4439ae3

Browse files
committed
Merge branch 'backport-oke-parallel-r42-p2' into 'release/4.2'
[OKE] [backport] internal OKE conversion in OWLS-115531 on main into release/4.2 See merge request weblogic-cloud/weblogic-kubernetes-operator!4716
2 parents 59698ca + 14c97c6 commit 4439ae3

File tree

4 files changed

+232
-96
lines changed

4 files changed

+232
-96
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItDedicatedMode.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
3838
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_NAME;
3939
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_TAG;
40+
import static oracle.weblogic.kubernetes.TestConstants.OKE_CLUSTER;
4041
import static oracle.weblogic.kubernetes.TestConstants.OPERATOR_CHART_DIR;
4142
import static oracle.weblogic.kubernetes.TestConstants.OPERATOR_RELEASE_NAME;
4243
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO_SECRET_NAME;
@@ -46,6 +47,7 @@
4647
import static oracle.weblogic.kubernetes.actions.impl.Domain.scaleClusterWithRestApi;
4748
import static oracle.weblogic.kubernetes.utils.ClusterUtils.createClusterResourceAndAddReferenceToDomain;
4849
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodReadyAndServiceExists;
50+
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.scaleAndVerifyCluster;
4951
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.verifyClusterAfterScaling;
5052
import static oracle.weblogic.kubernetes.utils.DomainUtils.createDomainAndVerify;
5153
import static oracle.weblogic.kubernetes.utils.OKDUtils.createRouteForOKD;
@@ -66,7 +68,7 @@
6668
*/
6769
@DisplayName("Test Operator and WebLogic domain with Dedicated set to true")
6870
@Tag("kind-sequential")
69-
@Tag("oke-sequential")
71+
@Tag("oke-gate")
7072
@Tag("okd-wls-mrg")
7173
@IntegrationTest
7274
class ItDedicatedMode {
@@ -208,8 +210,13 @@ void testDedicatedModeSameNamespace() {
208210
}
209211

210212
logger.info("scaling the cluster from {0} servers to {1} servers", replicaCount, replicaCount + 1);
211-
scaleClusterWithRestApi(domainUid, clusterName, replicaCount + 1,
212-
externalRestHttpshost, externalRestHttpsPort, opNamespace, opServiceAccount);
213+
if (OKE_CLUSTER) {
214+
scaleAndVerifyCluster(clusterResName, domainUid, domain1Namespace, managedServerPodPrefix,
215+
replicaCount, replicaCount + 1, null, null);
216+
} else {
217+
scaleClusterWithRestApi(domainUid, clusterName, replicaCount + 1,
218+
externalRestHttpshost, externalRestHttpsPort, opNamespace, opServiceAccount);
219+
}
213220

214221
verifyClusterAfterScaling(domainUid, domain1Namespace, managedServerPodPrefix,
215222
replicaCount, replicaCount + 1, null, null, listOfPodCreationTimestamp);

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiDynamicUpdatePart3.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
@DisplayName("Test dynamic updates to a model in image domain, part3")
7979
@IntegrationTest
8080
@Tag("olcne-mrg")
81-
@Tag("oke-sequential")
81+
@Tag("oke-gate")
8282
@Tag("kind-parallel")
8383
@Tag("toolkits-srg")
8484
@Tag("okd-wls-mrg")
@@ -302,8 +302,7 @@ void testMiiChangeDataSourceParameterWithCommitUpdateAndRoll() {
302302

303303
// This test uses the WebLogic domain created in BeforeAll method
304304
// BeforeEach method ensures that the server pods are running
305-
LinkedHashMap<String, OffsetDateTime> pods =
306-
helper.addDataSourceAndVerify(false);
305+
LinkedHashMap<String, OffsetDateTime> pods = helper.addDataSourceAndVerify(false);
307306

308307
// Replace contents of an existing configMap with cm config and application target as
309308
// there are issues with removing them, WDT-535
@@ -328,7 +327,6 @@ void testMiiChangeDataSourceParameterWithCommitUpdateAndRoll() {
328327

329328
verifyPodIntrospectVersionUpdated(pods.keySet(), introspectVersion, helper.domainNamespace);
330329

331-
332330
// check datasource configuration using REST api
333331
if (OKE_CLUSTER) {
334332
assertTrue(checkSystemResourceConfigViaAdminPod(helper.adminServerPodName, helper.domainNamespace,
@@ -377,8 +375,7 @@ void testMiiChangeDataSourceParameterWithCommitUpdateAndRoll() {
377375

378376
// write sparse yaml to delete datasource to file, delete ds to keep the config clean
379377
Path pathToDeleteDSYaml = Paths.get(WORK_DIR + "/deleteds.yaml");
380-
String yamlToDeleteDS = "resources:\n"
381-
+ " JDBCSystemResource:\n";
378+
String yamlToDeleteDS = "resources:\n" + " JDBCSystemResource:\n";
382379

383380
assertDoesNotThrow(() -> Files.write(pathToDeleteDSYaml, yamlToDeleteDS.getBytes()));
384381

@@ -426,12 +423,9 @@ void testMiiChangeDataSourceParameterWithCommitUpdateAndRoll() {
426423
}
427424
logger.info("JDBCSystemResource Datasource is deleted");
428425

429-
430-
431426
// check that the domain status condition contains the correct type and expected status
432427
logger.info("verifying the domain status condition contains the correct type and expected status");
433428
helper.verifyDomainStatusConditionNoErrorMsg("Completed", "True");
434-
435429
}
436430

437431
private void verifyIntrospectorFailsWithExpectedErrorMsg(String expectedErrorMsg) {

0 commit comments

Comments
 (0)