From a29c07fd9179df5e95996424a8390bc8ff969915 Mon Sep 17 00:00:00 2001 From: huizhao Date: Fri, 30 Apr 2021 17:35:13 +0000 Subject: [PATCH 1/3] Added tests to use script scaleCluster.sh/ClusterStatus.sh --- .../kubernetes/ItServerStartPolicy.java | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java index d1d9de1fb26..05b153e65f2 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java @@ -64,6 +64,7 @@ import static oracle.weblogic.kubernetes.utils.CommonPatchTestUtils.patchServerStartPolicy; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkClusterReplicaCountMatches; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodDeleted; +import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodDoesNotExist; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodInitializing; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodReadyAndServiceExists; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createConfigMapAndVerify; @@ -104,6 +105,8 @@ class ItServerStartPolicy { public static final String START_CLUSTER_SCRIPT = "startCluster.sh"; public static final String STOP_DOMAIN_SCRIPT = "stopDomain.sh"; public static final String START_DOMAIN_SCRIPT = "startDomain.sh"; + public static final String SCALE_CLUSTER_SCRIPT = "scaleCluster.sh"; + public static final String STATUS_CLUSTER_SCRIPT = "clusterStatus.sh"; public static final String managedServerNamePrefix = "managed-server"; public static final String CLUSTER_1 = "cluster-1"; public static final String CLUSTER_2 = "cluster-2"; @@ -1130,6 +1133,133 @@ public void testRestartingMSWithExplicitServerStartStateWhileVaryingReplicaCount logger.info("managed server " + serverName + " restarted successfully."); } + /** + * Scale the configured cluster using the sample script scaleCluster.sh script + * Verify that server(s) in the configured cluster are scaled up and in RUNNING state. + * Verify that server(s) in the dynamic cluster are not affected. + * Restore the env using the sample script stopServer.sh. + */ + @Order(19) + @Test + @DisplayName("Scale the configured cluster with scaleCluster.sh script") + public void testConfigClusterScale() { + int newReplicaCount = 2; + String configServerName = "config-cluster-server" + newReplicaCount; + String configServerPodName = domainUid + "-" + configServerName; + String dynamicServerPodName = domainUid + "-managed-server" + newReplicaCount; + + // make sure the server-to-be-test doesn't exist + restoreEnv(); + checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); + checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); + + // use scaleCluster.sh to scale a configured cluster + logger.info("Scale configured cluster using the script scaleCluster.sh"); + String result = assertDoesNotThrow(() -> + executeLifecycleScript(SCALE_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_2, " -r " + newReplicaCount, false), + String.format("Failed to run %s", SCALE_CLUSTER_SCRIPT)); + + checkPodReadyAndServiceExists(configServerPodName, domainUid, domainNamespace); + assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_2, + domainUid, domainNamespace, newReplicaCount))); + + // use clusterStatus.sh to verify scaling results + result = assertDoesNotThrow(() -> + executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_2), + String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT)); + + String regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)2(\\s+)2(\\s+)2"; + assertTrue(verifyExecuteResult(result, regex),"The script should scale up the cluster: " + CLUSTER_2); + logger.info("Configured cluster " + CLUSTER_2 + " scaled successfully."); + + // check managed server from other cluster are not affected + logger.info("Check dynamic managed server pods are not affected"); + assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_1, + domainUid, domainNamespace, replicaCount))); + + checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); + + // restore test env + result = assertDoesNotThrow(() -> + executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, configServerName), + String.format("Failed to run %s", STOP_SERVER_SCRIPT)); + checkPodDeleted(configServerPodName, domainUid, domainNamespace); + logger.info("managed server " + configServerPodName + " stopped successfully."); + } + + /** + * Scale the dynamic cluster using the sample script scaleCluster.sh script + * Verify that server(s) in the dynamic cluster are scaled up and in RUNNING state. + * Verify that server(s) in the configured cluster are not affected. + * Restore the env using the sample script stopServer.sh. + */ + @Order(20) + @Test + @DisplayName("Scale the dynamic cluster with scaleCluster.sh script") + public void testDynamicClusterScale() { + int newReplicaCount = 2; + String dynamicServerName = "managed-server" + newReplicaCount; + String dynamicServerPodName = domainUid + "-" + dynamicServerName; + String configServerPodName = domainUid + "-config-cluster-server" + newReplicaCount; + + // make sure the server-to-be-test doesn't exist + restoreEnv(); + checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); + checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); + + // use scaleCluster.sh to scale a dynamic cluster + logger.info("Scale dynamic cluster using the script scaleCluster.sh"); + String result = assertDoesNotThrow(() -> + executeLifecycleScript(SCALE_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_1, " -r " + newReplicaCount, false), + String.format("Failed to run %s", SCALE_CLUSTER_SCRIPT)); + + checkPodReadyAndServiceExists(dynamicServerPodName, domainUid, domainNamespace); + assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_1, + domainUid, domainNamespace, newReplicaCount))); + + // use clusterStatus.sh to verify scaling results + result = assertDoesNotThrow(() -> + executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_1), + String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT)); + + String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)2(\\s+)2(\\s+)2"; + assertTrue(verifyExecuteResult(result, regex),"The script should scale up the cluster: " + CLUSTER_1); + logger.info("Dynamic cluster " + CLUSTER_1 + " scaled successfully."); + + // check managed server from other cluster are not affected + logger.info("Check configured managed server pods are not affected"); + assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_2, + domainUid, domainNamespace, replicaCount))); + checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); + + // restore test env + logger.info("Stop managed server using the script"); + executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, dynamicServerName); + checkPodDeleted(dynamicServerPodName, domainUid, domainNamespace); + logger.info("managed server " + configServerPodName + " stopped successfully."); + } + + private void restoreEnv() { + int newReplicaCount = 2; + String configServerName = "config-cluster-server" + newReplicaCount; + String configServerPodName = domainUid + "-" + configServerName; + String dynamicServerName = "managed-server" + newReplicaCount; + String dynamicServerPodName = domainUid + "-" + dynamicServerName; + + // restore test env + assertDoesNotThrow(() -> + executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, configServerName), + String.format("Failed to run %s", STOP_SERVER_SCRIPT)); + checkPodDeleted(configServerPodName, domainUid, domainNamespace); + logger.info("managed server " + configServerPodName + " stopped successfully."); + + assertDoesNotThrow(() -> + executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, dynamicServerName), + String.format("Failed to run %s", STOP_SERVER_SCRIPT)); + checkPodDeleted(dynamicServerPodName, domainUid, domainNamespace); + logger.info("managed server " + dynamicServerPodName + " stopped successfully."); + } + private static void createDomainSecret(String secretName, String username, String password, String domNamespace) { Map secretMap = new HashMap<>(); secretMap.put("username", username); @@ -1284,6 +1414,7 @@ private String executeLifecycleScript(String script, boolean checkResult, String... args) { String domainName = (args.length == 0) ? domainUid : args[0]; + CommandParams params; String commonParameters = " -d " + domainName + " -n " + domainNamespace; params = new CommandParams().defaults(); @@ -1292,6 +1423,10 @@ private String executeLifecycleScript(String script, + Paths.get(domainLifecycleSamplePath.toString(), "/" + script).toString() + commonParameters + " -s " + entityName + " " + extraParams); } else if (scriptType.equals(CLUSTER_LIFECYCLE)) { + if (extraParams.contains("-r")) { + commonParameters += " " + extraParams; + } + params.command("sh " + Paths.get(domainLifecycleSamplePath.toString(), "/" + script).toString() + commonParameters + " -c " + entityName); From 9e3476a90cc152c337e2c6d4eadea445ec2aa58c Mon Sep 17 00:00:00 2001 From: huizhao Date: Wed, 5 May 2021 17:45:13 +0000 Subject: [PATCH 2/3] Changes based on the comments --- .../kubernetes/ItServerStartPolicy.java | 117 +++++++----------- 1 file changed, 45 insertions(+), 72 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java index 05b153e65f2..924676927fa 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java @@ -90,7 +90,6 @@ * managed server. The replica count is set to 1 and serverStartPolicy is set * to IF_NEEDED at managed server level. */ - @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @DisplayName("ServerStartPolicy attribute in different levels in a MII domain") @IntegrationTest @@ -1148,43 +1147,26 @@ public void testConfigClusterScale() { String configServerPodName = domainUid + "-" + configServerName; String dynamicServerPodName = domainUid + "-managed-server" + newReplicaCount; - // make sure the server-to-be-test doesn't exist - restoreEnv(); - checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); - checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); - - // use scaleCluster.sh to scale a configured cluster - logger.info("Scale configured cluster using the script scaleCluster.sh"); - String result = assertDoesNotThrow(() -> - executeLifecycleScript(SCALE_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_2, " -r " + newReplicaCount, false), - String.format("Failed to run %s", SCALE_CLUSTER_SCRIPT)); - - checkPodReadyAndServiceExists(configServerPodName, domainUid, domainNamespace); - assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_2, - domainUid, domainNamespace, newReplicaCount))); + // use clusterStatus.sh to make sure the server-to-be-test doesn't exist + String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); + regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); + // use scaleCluster.sh to scale a dynamic cluster and // use clusterStatus.sh to verify scaling results - result = assertDoesNotThrow(() -> - executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_2), - String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT)); - - String regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)2(\\s+)2(\\s+)2"; - assertTrue(verifyExecuteResult(result, regex),"The script should scale up the cluster: " + CLUSTER_2); - logger.info("Configured cluster " + CLUSTER_2 + " scaled successfully."); + regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)2(\\s+)2(\\s+)2"; + scalingClusters(CLUSTER_2, configServerPodName, newReplicaCount, regex, true); // check managed server from other cluster are not affected logger.info("Check dynamic managed server pods are not affected"); assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_1, domainUid, domainNamespace, replicaCount))); - checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); - // restore test env - result = assertDoesNotThrow(() -> - executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, configServerName), - String.format("Failed to run %s", STOP_SERVER_SCRIPT)); - checkPodDeleted(configServerPodName, domainUid, domainNamespace); - logger.info("managed server " + configServerPodName + " stopped successfully."); + // use clusterStatus.sh to restore test env + regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); } /** @@ -1202,29 +1184,16 @@ public void testDynamicClusterScale() { String dynamicServerPodName = domainUid + "-" + dynamicServerName; String configServerPodName = domainUid + "-config-cluster-server" + newReplicaCount; - // make sure the server-to-be-test doesn't exist - restoreEnv(); - checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); - checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); - - // use scaleCluster.sh to scale a dynamic cluster - logger.info("Scale dynamic cluster using the script scaleCluster.sh"); - String result = assertDoesNotThrow(() -> - executeLifecycleScript(SCALE_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_1, " -r " + newReplicaCount, false), - String.format("Failed to run %s", SCALE_CLUSTER_SCRIPT)); - - checkPodReadyAndServiceExists(dynamicServerPodName, domainUid, domainNamespace); - assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(CLUSTER_1, - domainUid, domainNamespace, newReplicaCount))); + // use clusterStatus.sh to make sure the server-to-be-test doesn't exist + String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); + regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); + // use scaleCluster.sh to scale a dynamic cluster and // use clusterStatus.sh to verify scaling results - result = assertDoesNotThrow(() -> - executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_1), - String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT)); - - String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)2(\\s+)2(\\s+)2"; - assertTrue(verifyExecuteResult(result, regex),"The script should scale up the cluster: " + CLUSTER_1); - logger.info("Dynamic cluster " + CLUSTER_1 + " scaled successfully."); + regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)2(\\s+)2(\\s+)2"; + scalingClusters(CLUSTER_1, dynamicServerPodName, newReplicaCount, regex, true); // check managed server from other cluster are not affected logger.info("Check configured managed server pods are not affected"); @@ -1232,32 +1201,36 @@ public void testDynamicClusterScale() { domainUid, domainNamespace, replicaCount))); checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); - // restore test env - logger.info("Stop managed server using the script"); - executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, dynamicServerName); - checkPodDeleted(dynamicServerPodName, domainUid, domainNamespace); - logger.info("managed server " + configServerPodName + " stopped successfully."); + // use clusterStatus.sh to restore test env + regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; + scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); } - private void restoreEnv() { - int newReplicaCount = 2; - String configServerName = "config-cluster-server" + newReplicaCount; - String configServerPodName = domainUid + "-" + configServerName; - String dynamicServerName = "managed-server" + newReplicaCount; - String dynamicServerPodName = domainUid + "-" + dynamicServerName; + private void scalingClusters(String clusterName, String serverPodName, int replicaNum, + String regex, boolean checkPodExist) { + // use scaleCluster.sh to scale a given cluster + logger.info("Scale cluster {0} using the script scaleCluster.sh", clusterName); + String result = assertDoesNotThrow(() -> + executeLifecycleScript(SCALE_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, clusterName, " -r " + replicaNum, false), + String.format("Failed to run %s", SCALE_CLUSTER_SCRIPT)); - // restore test env - assertDoesNotThrow(() -> - executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, configServerName), - String.format("Failed to run %s", STOP_SERVER_SCRIPT)); - checkPodDeleted(configServerPodName, domainUid, domainNamespace); - logger.info("managed server " + configServerPodName + " stopped successfully."); + if (checkPodExist) { + checkPodReadyAndServiceExists(serverPodName, domainUid, domainNamespace); + } else { + checkPodDoesNotExist(serverPodName, domainUid, domainNamespace); + } - assertDoesNotThrow(() -> - executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, dynamicServerName), - String.format("Failed to run %s", STOP_SERVER_SCRIPT)); - checkPodDeleted(dynamicServerPodName, domainUid, domainNamespace); - logger.info("managed server " + dynamicServerPodName + " stopped successfully."); + // verify that scaleCluster.sh does scale to a required replica number + assertDoesNotThrow(() -> assertTrue(checkClusterReplicaCountMatches(clusterName, + domainUid, domainNamespace, replicaNum))); + + // use clusterStatus.sh to verify scaling results + result = assertDoesNotThrow(() -> + executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, clusterName), + String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT)); + + assertTrue(verifyExecuteResult(result, regex), "The script should scale the given cluster: " + clusterName); + logger.info("The cluster {0} scaled successfully.", clusterName); } private static void createDomainSecret(String secretName, String username, String password, String domNamespace) { From 5f69ec7448505700d594604d6a10be657c5270f7 Mon Sep 17 00:00:00 2001 From: huizhao Date: Thu, 6 May 2021 00:42:45 +0000 Subject: [PATCH 3/3] Added more desriptions --- .../kubernetes/ItServerStartPolicy.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java index 924676927fa..823ea9ecb4b 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItServerStartPolicy.java @@ -1148,13 +1148,22 @@ public void testConfigClusterScale() { String dynamicServerPodName = domainUid + "-managed-server" + newReplicaCount; // use clusterStatus.sh to make sure the server-to-be-test doesn't exist + // String regex matches below + // cluster min max goal current ready + // clusterName 1 5 1 1 1 String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); + // String regex matches below + // cluster min max goal current ready + // clusterName 0 2 1 1 1 regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); // use scaleCluster.sh to scale a dynamic cluster and // use clusterStatus.sh to verify scaling results + // String regex matches below + // cluster min max goal current ready + // clusterName 0 2 2 2 2 regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)2(\\s+)2(\\s+)2"; scalingClusters(CLUSTER_2, configServerPodName, newReplicaCount, regex, true); @@ -1165,6 +1174,9 @@ public void testConfigClusterScale() { checkPodDoesNotExist(dynamicServerPodName, domainUid, domainNamespace); // use clusterStatus.sh to restore test env + // String regex matches below + // cluster min max goal current ready + // clusterName 0 2 1 1 1 regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); } @@ -1185,13 +1197,22 @@ public void testDynamicClusterScale() { String configServerPodName = domainUid + "-config-cluster-server" + newReplicaCount; // use clusterStatus.sh to make sure the server-to-be-test doesn't exist + // String regex matches below + // cluster min max goal current ready + // clusterName 1 5 1 1 1 String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); + // String regex matches below + // cluster min max goal current ready + // clusterName 0 2 1 1 1 regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_2, configServerPodName, replicaCount, regex, false); // use scaleCluster.sh to scale a dynamic cluster and // use clusterStatus.sh to verify scaling results + // String regex matches below + // cluster min max goal current ready + // clusterName 1 5 2 2 2 regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)2(\\s+)2(\\s+)2"; scalingClusters(CLUSTER_1, dynamicServerPodName, newReplicaCount, regex, true); @@ -1202,6 +1223,9 @@ public void testDynamicClusterScale() { checkPodDoesNotExist(configServerPodName, domainUid, domainNamespace); // use clusterStatus.sh to restore test env + // String regex matches below + // cluster min max goal current ready + // clusterName 1 5 1 1 1 regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1"; scalingClusters(CLUSTER_1, dynamicServerPodName, replicaCount, regex, false); }