From 6f5ce9bb6be6675ac1e8f0cee4d74cf8a7e41c8e Mon Sep 17 00:00:00 2001 From: sankar Date: Tue, 7 Sep 2021 18:14:40 -0700 Subject: [PATCH 01/15] new profile for olcne tests --- integration-tests/pom.xml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 76131490f6d..2168c92c3fd 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -309,39 +309,34 @@ false - **/ItCoherenceTests, + **/ItExternalLbTunneling, + **/ItMiiAuxiliaryImage, + **/ItMiiAuxiliaryImageCluster, + **/ItMiiSampleWlsAux, + **/ItMiiCustomSslStore, + **/ItMiiServiceMigration, + **/ItRemoteConsole, **/ItConfigDistributionStrategy, **/ItCrossDomainTransaction, **/ItElasticLogging, **/ItElasticLoggingFluentd, - **/ItExternalRmiTunneling, - **/ItInitContainers, **/ItIntrospectVersion, - **/ItIstioCrossDomainTransaction, - **/ItIstioDomainInImage, + **/ItCrossDomainTransaction, **/ItIstioDomainInPV, **/ItIstioMiiDomain, - **/ItIstioTwoDomainsInImage, - **/ItKubernetesEvents, - **/ItManageNameSpace, + **/ItManagedCoherence, **/ItMiiDomain, - **/ItMiiDomainModelInPV, **/ItMiiDynamicUpdate, - **/ItMiiMultiModel, - **/ItMiiSample, + **/ItMiiSampleWlsMain, **/ItMiiUpdateDomainConfig, **/ItMonitoringExporter, - **/ItOperatorRestart, **/ItParameterizedDomain, - **/ItPodTemplates, - **/ItPodsRestart, **/ItPodsShutdownOption, **/ItProductionSecureMode, **/ItWlsSamples, - **/ItServerStartPolicy, **/ItSessionMigration, - **/ItSystemResOverrides, - **/ItUsabilityOperatorHelmChart + **/ItStickySession, + **/ItSystemResOverrides From e9bc63cee3785deee805380332359feafb7a0a6e Mon Sep 17 00:00:00 2001 From: sankar Date: Thu, 9 Sep 2021 09:47:15 -0700 Subject: [PATCH 02/15] debugging --- .../weblogic/kubernetes/ItMiiAuxiliaryImage.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java index 1bf81ae248c..1dd436bb9a9 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java @@ -1180,8 +1180,15 @@ private void checkConfiguredJMSresouce(String domainNamespace, String adminServe int adminServiceNodePort = getServiceNodePort(domainNamespace, getExternalServicePodName(adminServerPodName), "default"); assertNotEquals(-1, adminServiceNodePort, "admin server default node port is not valid"); - assertTrue(checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", - "TestClusterJmsModule2", "200"), "JMSSystemResources not found"); + //assertTrue(checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", + // "TestClusterJmsModule2", "200"), "JMSSystemResources not found"); + checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", + "TestClusterJmsModule2", "200"); + try { + Thread.sleep(60 * 60* 1000); + } catch (InterruptedException ex) { + // no op + } logger.info("Found the JMSSystemResource configuration"); } From 346a9aadf57b6320b1b8604c593860cf70b265eb Mon Sep 17 00:00:00 2001 From: sankar Date: Thu, 9 Sep 2021 09:48:27 -0700 Subject: [PATCH 03/15] wip --- .../java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java index 1dd436bb9a9..ba509685406 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java @@ -1185,7 +1185,7 @@ private void checkConfiguredJMSresouce(String domainNamespace, String adminServe checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", "TestClusterJmsModule2", "200"); try { - Thread.sleep(60 * 60* 1000); + Thread.sleep(60 * 60 * 1000); } catch (InterruptedException ex) { // no op } From b6cabb9e827a487b13736df980f8a63aeea882ec Mon Sep 17 00:00:00 2001 From: sankar Date: Thu, 9 Sep 2021 10:30:40 -0700 Subject: [PATCH 04/15] rollback debug --- .../weblogic/kubernetes/ItMiiAuxiliaryImage.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java index ba509685406..1bf81ae248c 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiAuxiliaryImage.java @@ -1180,15 +1180,8 @@ private void checkConfiguredJMSresouce(String domainNamespace, String adminServe int adminServiceNodePort = getServiceNodePort(domainNamespace, getExternalServicePodName(adminServerPodName), "default"); assertNotEquals(-1, adminServiceNodePort, "admin server default node port is not valid"); - //assertTrue(checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", - // "TestClusterJmsModule2", "200"), "JMSSystemResources not found"); - checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", - "TestClusterJmsModule2", "200"); - try { - Thread.sleep(60 * 60 * 1000); - } catch (InterruptedException ex) { - // no op - } + assertTrue(checkSystemResourceConfiguration(adminServiceNodePort, "JMSSystemResources", + "TestClusterJmsModule2", "200"), "JMSSystemResources not found"); logger.info("Found the JMSSystemResource configuration"); } From 74cfb66a77564092f00eaba086cc15b809e06cc5 Mon Sep 17 00:00:00 2001 From: sankar Date: Thu, 9 Sep 2021 11:54:30 -0700 Subject: [PATCH 05/15] wip --- .../kubernetes/ItMiiCustomSslStore.java | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java index 43e32fea117..3db86a5214c 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java @@ -6,6 +6,7 @@ import java.nio.file.Paths; import java.util.Arrays; import java.util.List; +import java.util.concurrent.TimeUnit; import oracle.weblogic.kubernetes.annotations.IntegrationTest; import oracle.weblogic.kubernetes.annotations.Namespaces; @@ -50,14 +51,14 @@ * This test class verifies usage of CustomIdentityCustomTrust on PV. * Create an MII domain with an attached persistent volume. * Configure custom identity and custom trust on server template - * Don't explicitly set the SSL port on the server template. + * Don't explicitly set the SSL port on the server template. * The default will be set to 8100. - * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory - * after administration server pod is started so that it can be accessible + * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory + * after administration server pod is started so that it can be accessible * from all managed server pods - * Once all servers are started get the JNDI initial context using cluster + * Once all servers are started get the JNDI initial context using cluster * service URL with t3s protocol. - * Repeat the same after scaling the cluster + * Repeat the same after scaling the cluster */ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @@ -69,8 +70,8 @@ class ItMiiCustomSslStore { private static String domainNamespace = null; private static int replicaCount = 2; private static final String domainUid = "mii-custom-ssl"; - private static String pvName = domainUid + "-pv"; - private static String pvcName = domainUid + "-pvc"; + private static String pvName = domainUid + "-pv"; + private static String pvcName = domainUid + "-pvc"; private static final String adminServerPodName = domainUid + "-admin-server"; private static final String managedServerPrefix = domainUid + "-managed-server"; private static LoggingFacade logger = null; @@ -79,7 +80,7 @@ class ItMiiCustomSslStore { /** * Install Operator. * Create domain resource definition. - * @param namespaces list of namespaces created by the IntegrationTestWatcher by the + * @param namespaces list of namespaces created by the IntegrationTestWatcher by the * JUnit engine parameter resolution mechanism */ @BeforeAll @@ -94,7 +95,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Creating unique namespace for Domain"); assertNotNull(namespaces.get(1), "Namespace list is null"); domainNamespace = namespaces.get(1); - + // Create the repo secret to pull the image // this secret is used only for non-kind cluster createOcirRepoSecret(domainNamespace); @@ -103,11 +104,11 @@ public static void initAll(@Namespaces(2) List namespaces) { installAndVerifyOperator(opNamespace, domainNamespace); // create secret for admin credential with special characters - // the resultant password is ##W%*}!"'"`']\\\\//1$$~x + // the resultant password is ##W%*}!"'"`']\\\\//1$$~x // let the user name be something other than weblogic say wlsadmin logger.info("Create secret for admin credentials"); String adminSecretName = "weblogic-credentials"; - assertDoesNotThrow(() -> createDomainSecret(adminSecretName, + assertDoesNotThrow(() -> createDomainSecret(adminSecretName, "wlsadmin", "##W%*}!\"'\"`']\\\\//1$$~x", domainNamespace), String.format("createSecret failed for %s", adminSecretName)); @@ -152,7 +153,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Check admin service and pod {0} is created in namespace {1}", adminServerPodName, domainNamespace); checkPodReadyAndServiceExists(adminServerPodName, domainUid, domainNamespace); - // Generate JKS Keystore using openssl before + // Generate JKS Keystore using openssl before // managed server services and pods are ready generateJksStores(); assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -164,6 +165,12 @@ public static void initAll(@Namespaces(2) List namespaces) { Paths.get(RESULTS_ROOT, "TrustKeyStore.jks"), Paths.get("/shared/TrustKeyStore.jks"))); + try { + TimeUnit.MINUTES.sleep(60); + } catch (InterruptedException ex) { + // no op + } + for (int i = 1; i <= replicaCount; i++) { logger.info("Wait for managed server services and pods are created in namespace {0}", domainNamespace); @@ -179,7 +186,7 @@ public static void initAll(@Namespaces(2) List namespaces) { @Order(1) @DisplayName("Verify JNDI Context can be accessed using t3s cluster URL") void testMiiGetCustomSSLContext() { - + // build the standalone Client on Admin pod after rolling restart String destLocation = "/u01/SslTestClient.java"; assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -187,7 +194,7 @@ void testMiiGetCustomSSLContext() { Paths.get(RESOURCE_DIR, "ssl", "SslTestClient.java"), Paths.get(destLocation))); runJavacInsidePod(adminServerPodName, domainNamespace, destLocation); - + runClientOnAdminPod(); boolean psuccess = assertDoesNotThrow(() -> From 71ce25ae1b0db0574b927021aa7a886cbb23f516 Mon Sep 17 00:00:00 2001 From: sankar Date: Fri, 10 Sep 2021 07:34:19 -0700 Subject: [PATCH 06/15] wip --- .../oracle/weblogic/kubernetes/ItMiiCustomSslStore.java | 7 ------- .../oracle/weblogic/kubernetes/ItParameterizedDomain.java | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java index 3db86a5214c..47c32005126 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java @@ -6,7 +6,6 @@ import java.nio.file.Paths; import java.util.Arrays; import java.util.List; -import java.util.concurrent.TimeUnit; import oracle.weblogic.kubernetes.annotations.IntegrationTest; import oracle.weblogic.kubernetes.annotations.Namespaces; @@ -165,12 +164,6 @@ public static void initAll(@Namespaces(2) List namespaces) { Paths.get(RESULTS_ROOT, "TrustKeyStore.jks"), Paths.get("/shared/TrustKeyStore.jks"))); - try { - TimeUnit.MINUTES.sleep(60); - } catch (InterruptedException ex) { - // no op - } - for (int i = 1; i <= replicaCount; i++) { logger.info("Wait for managed server services and pods are created in namespace {0}", domainNamespace); diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java index 3fc7a329c99..e02b6c36a68 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java @@ -18,6 +18,7 @@ import java.util.Map; import java.util.Properties; import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; import java.util.stream.Stream; import io.kubernetes.client.custom.Quantity; @@ -547,6 +548,11 @@ void testLivenessProbe() { true, "/bin/sh", "-c", destLocation + " " + serverName), String.format("Failed to execute script %s in pod %s namespace %s", destLocation, serverName, domainNamespace)); + try { + TimeUnit.HOURS.sleep(3); + } catch (InterruptedException ex) { + // no op + } assertTrue(execResult.exitValue() == 0, String.format("Failed to execute kill server inside pod, stderr %s stdout %s", destLocation, execResult.stderr(), execResult.stdout())); From 0279af724cc005db6ea30610f1784f82df999bf3 Mon Sep 17 00:00:00 2001 From: sankar Date: Fri, 10 Sep 2021 09:08:00 -0700 Subject: [PATCH 07/15] wip --- .../java/oracle/weblogic/kubernetes/ItParameterizedDomain.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java index e02b6c36a68..a2368ec6e51 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java @@ -1496,6 +1496,9 @@ private File createScriptToKillServer() throws IOException { killServerScript.deleteOnExit(); try (FileWriter fw = new FileWriter(killServerScript)) { fw.write("#!/bin/bash\n"); + fw.write("jps\n"); + fw.write("jps | grep Server\n"); + fw.write("jps | grep Server | awk '{print $1}\n"); fw.write("kill -9 `jps | grep Server | awk '{print $1}'`"); } killServerScript.setExecutable(true, false); From 00c99ea53800964a480c4d81745a72a894fcd3c7 Mon Sep 17 00:00:00 2001 From: sankar Date: Fri, 10 Sep 2021 11:21:40 -0700 Subject: [PATCH 08/15] wip --- .../java/oracle/weblogic/kubernetes/ItParameterizedDomain.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java index a2368ec6e51..0626d788868 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java @@ -1498,7 +1498,7 @@ private File createScriptToKillServer() throws IOException { fw.write("#!/bin/bash\n"); fw.write("jps\n"); fw.write("jps | grep Server\n"); - fw.write("jps | grep Server | awk '{print $1}\n"); + fw.write("jps | grep Server | awk '{print $1}'\n"); fw.write("kill -9 `jps | grep Server | awk '{print $1}'`"); } killServerScript.setExecutable(true, false); From 9d17387b45ce07801315901cc24ed9dceab87272 Mon Sep 17 00:00:00 2001 From: sankar Date: Fri, 10 Sep 2021 13:05:49 -0700 Subject: [PATCH 09/15] wip --- .../java/oracle/weblogic/kubernetes/ItParameterizedDomain.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java index 0626d788868..e6686713102 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java @@ -548,6 +548,8 @@ void testLivenessProbe() { true, "/bin/sh", "-c", destLocation + " " + serverName), String.format("Failed to execute script %s in pod %s namespace %s", destLocation, serverName, domainNamespace)); + logger.info("Command executed to kill server inside pod, exit value {0}, stdout {1}, stderr {2}", + execResult.exitValue(), execResult.stdout(), execResult.stderr()); try { TimeUnit.HOURS.sleep(3); } catch (InterruptedException ex) { From 41f5cd109ef878aed67911f1abbdf506e1fa824a Mon Sep 17 00:00:00 2001 From: sankar Date: Fri, 10 Sep 2021 21:26:21 -0700 Subject: [PATCH 10/15] wip --- .../oracle/weblogic/kubernetes/ItParameterizedDomain.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java index e6686713102..3561e1c0801 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItParameterizedDomain.java @@ -18,7 +18,6 @@ import java.util.Map; import java.util.Properties; import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; import java.util.stream.Stream; import io.kubernetes.client.custom.Quantity; @@ -550,11 +549,6 @@ void testLivenessProbe() { serverName, domainNamespace)); logger.info("Command executed to kill server inside pod, exit value {0}, stdout {1}, stderr {2}", execResult.exitValue(), execResult.stdout(), execResult.stderr()); - try { - TimeUnit.HOURS.sleep(3); - } catch (InterruptedException ex) { - // no op - } assertTrue(execResult.exitValue() == 0, String.format("Failed to execute kill server inside pod, stderr %s stdout %s", destLocation, execResult.stderr(), execResult.stdout())); From 3663cf115f4372e94901e700b6ec2171b870a14b Mon Sep 17 00:00:00 2001 From: sankar Date: Sun, 12 Sep 2021 20:25:12 -0700 Subject: [PATCH 11/15] update the profile --- integration-tests/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 2168c92c3fd..d8f2e629fde 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -309,13 +309,13 @@ false - **/ItExternalLbTunneling, + **/ItMiiAuxiliaryImage, **/ItMiiAuxiliaryImageCluster, **/ItMiiSampleWlsAux, - **/ItMiiCustomSslStore, + **/ItMiiServiceMigration, - **/ItRemoteConsole, + **/ItConfigDistributionStrategy, **/ItCrossDomainTransaction, **/ItElasticLogging, @@ -324,7 +324,7 @@ **/ItCrossDomainTransaction, **/ItIstioDomainInPV, **/ItIstioMiiDomain, - **/ItManagedCoherence, + **/ItMiiDomain, **/ItMiiDynamicUpdate, **/ItMiiSampleWlsMain, @@ -335,7 +335,7 @@ **/ItProductionSecureMode, **/ItWlsSamples, **/ItSessionMigration, - **/ItStickySession, + **/ItSystemResOverrides From 45f2597e818e8bf0b2d26c22147fa724210e2d26 Mon Sep 17 00:00:00 2001 From: sankar Date: Mon, 13 Sep 2021 11:34:21 -0700 Subject: [PATCH 12/15] reset ssl store --- .../kubernetes/ItMiiCustomSslStore.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java index 93947c893ff..43e32fea117 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java @@ -13,6 +13,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; @@ -49,14 +50,14 @@ * This test class verifies usage of CustomIdentityCustomTrust on PV. * Create an MII domain with an attached persistent volume. * Configure custom identity and custom trust on server template - * Don't explicitly set the SSL port on the server template. + * Don't explicitly set the SSL port on the server template. * The default will be set to 8100. - * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory - * after administration server pod is started so that it can be accessible + * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory + * after administration server pod is started so that it can be accessible * from all managed server pods - * Once all servers are started get the JNDI initial context using cluster + * Once all servers are started get the JNDI initial context using cluster * service URL with t3s protocol. - * Repeat the same after scaling the cluster + * Repeat the same after scaling the cluster */ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @@ -68,8 +69,8 @@ class ItMiiCustomSslStore { private static String domainNamespace = null; private static int replicaCount = 2; private static final String domainUid = "mii-custom-ssl"; - private static String pvName = domainUid + "-pv"; - private static String pvcName = domainUid + "-pvc"; + private static String pvName = domainUid + "-pv"; + private static String pvcName = domainUid + "-pvc"; private static final String adminServerPodName = domainUid + "-admin-server"; private static final String managedServerPrefix = domainUid + "-managed-server"; private static LoggingFacade logger = null; @@ -78,7 +79,7 @@ class ItMiiCustomSslStore { /** * Install Operator. * Create domain resource definition. - * @param namespaces list of namespaces created by the IntegrationTestWatcher by the + * @param namespaces list of namespaces created by the IntegrationTestWatcher by the * JUnit engine parameter resolution mechanism */ @BeforeAll @@ -93,7 +94,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Creating unique namespace for Domain"); assertNotNull(namespaces.get(1), "Namespace list is null"); domainNamespace = namespaces.get(1); - + // Create the repo secret to pull the image // this secret is used only for non-kind cluster createOcirRepoSecret(domainNamespace); @@ -102,11 +103,11 @@ public static void initAll(@Namespaces(2) List namespaces) { installAndVerifyOperator(opNamespace, domainNamespace); // create secret for admin credential with special characters - // the resultant password is ##W%*}!"'"`']\\\\//1$$~x + // the resultant password is ##W%*}!"'"`']\\\\//1$$~x // let the user name be something other than weblogic say wlsadmin logger.info("Create secret for admin credentials"); String adminSecretName = "weblogic-credentials"; - assertDoesNotThrow(() -> createDomainSecret(adminSecretName, + assertDoesNotThrow(() -> createDomainSecret(adminSecretName, "wlsadmin", "##W%*}!\"'\"`']\\\\//1$$~x", domainNamespace), String.format("createSecret failed for %s", adminSecretName)); @@ -151,7 +152,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Check admin service and pod {0} is created in namespace {1}", adminServerPodName, domainNamespace); checkPodReadyAndServiceExists(adminServerPodName, domainUid, domainNamespace); - // Generate JKS Keystore using openssl before + // Generate JKS Keystore using openssl before // managed server services and pods are ready generateJksStores(); assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -175,9 +176,10 @@ public static void initAll(@Namespaces(2) List namespaces) { * The client uses t3s cluster URL with custom SSL TrustStore on the command line */ @Test + @Order(1) @DisplayName("Verify JNDI Context can be accessed using t3s cluster URL") void testMiiGetCustomSSLContext() { - + // build the standalone Client on Admin pod after rolling restart String destLocation = "/u01/SslTestClient.java"; assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -185,7 +187,7 @@ void testMiiGetCustomSSLContext() { Paths.get(RESOURCE_DIR, "ssl", "SslTestClient.java"), Paths.get(destLocation))); runJavacInsidePod(adminServerPodName, domainNamespace, destLocation); - + runClientOnAdminPod(); boolean psuccess = assertDoesNotThrow(() -> From a6df318f069df21be72199af62a1f32ae8f0e116 Mon Sep 17 00:00:00 2001 From: sankar Date: Mon, 13 Sep 2021 11:36:03 -0700 Subject: [PATCH 13/15] wip --- .../kubernetes/ItMiiCustomSslStore.java | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java index 43e32fea117..93947c893ff 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java @@ -13,7 +13,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; @@ -50,14 +49,14 @@ * This test class verifies usage of CustomIdentityCustomTrust on PV. * Create an MII domain with an attached persistent volume. * Configure custom identity and custom trust on server template - * Don't explicitly set the SSL port on the server template. + * Don't explicitly set the SSL port on the server template. * The default will be set to 8100. - * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory - * after administration server pod is started so that it can be accessible + * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory + * after administration server pod is started so that it can be accessible * from all managed server pods - * Once all servers are started get the JNDI initial context using cluster + * Once all servers are started get the JNDI initial context using cluster * service URL with t3s protocol. - * Repeat the same after scaling the cluster + * Repeat the same after scaling the cluster */ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @@ -69,8 +68,8 @@ class ItMiiCustomSslStore { private static String domainNamespace = null; private static int replicaCount = 2; private static final String domainUid = "mii-custom-ssl"; - private static String pvName = domainUid + "-pv"; - private static String pvcName = domainUid + "-pvc"; + private static String pvName = domainUid + "-pv"; + private static String pvcName = domainUid + "-pvc"; private static final String adminServerPodName = domainUid + "-admin-server"; private static final String managedServerPrefix = domainUid + "-managed-server"; private static LoggingFacade logger = null; @@ -79,7 +78,7 @@ class ItMiiCustomSslStore { /** * Install Operator. * Create domain resource definition. - * @param namespaces list of namespaces created by the IntegrationTestWatcher by the + * @param namespaces list of namespaces created by the IntegrationTestWatcher by the * JUnit engine parameter resolution mechanism */ @BeforeAll @@ -94,7 +93,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Creating unique namespace for Domain"); assertNotNull(namespaces.get(1), "Namespace list is null"); domainNamespace = namespaces.get(1); - + // Create the repo secret to pull the image // this secret is used only for non-kind cluster createOcirRepoSecret(domainNamespace); @@ -103,11 +102,11 @@ public static void initAll(@Namespaces(2) List namespaces) { installAndVerifyOperator(opNamespace, domainNamespace); // create secret for admin credential with special characters - // the resultant password is ##W%*}!"'"`']\\\\//1$$~x + // the resultant password is ##W%*}!"'"`']\\\\//1$$~x // let the user name be something other than weblogic say wlsadmin logger.info("Create secret for admin credentials"); String adminSecretName = "weblogic-credentials"; - assertDoesNotThrow(() -> createDomainSecret(adminSecretName, + assertDoesNotThrow(() -> createDomainSecret(adminSecretName, "wlsadmin", "##W%*}!\"'\"`']\\\\//1$$~x", domainNamespace), String.format("createSecret failed for %s", adminSecretName)); @@ -152,7 +151,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Check admin service and pod {0} is created in namespace {1}", adminServerPodName, domainNamespace); checkPodReadyAndServiceExists(adminServerPodName, domainUid, domainNamespace); - // Generate JKS Keystore using openssl before + // Generate JKS Keystore using openssl before // managed server services and pods are ready generateJksStores(); assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -176,10 +175,9 @@ public static void initAll(@Namespaces(2) List namespaces) { * The client uses t3s cluster URL with custom SSL TrustStore on the command line */ @Test - @Order(1) @DisplayName("Verify JNDI Context can be accessed using t3s cluster URL") void testMiiGetCustomSSLContext() { - + // build the standalone Client on Admin pod after rolling restart String destLocation = "/u01/SslTestClient.java"; assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -187,7 +185,7 @@ void testMiiGetCustomSSLContext() { Paths.get(RESOURCE_DIR, "ssl", "SslTestClient.java"), Paths.get(destLocation))); runJavacInsidePod(adminServerPodName, domainNamespace, destLocation); - + runClientOnAdminPod(); boolean psuccess = assertDoesNotThrow(() -> From 0e05973a14e352a61cb13b441d2e712f907dc740 Mon Sep 17 00:00:00 2001 From: sankar Date: Tue, 14 Sep 2021 07:46:11 -0700 Subject: [PATCH 14/15] reset ssl test --- .../kubernetes/ItMiiCustomSslStore.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java index 93947c893ff..a4670dba080 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiCustomSslStore.java @@ -49,14 +49,14 @@ * This test class verifies usage of CustomIdentityCustomTrust on PV. * Create an MII domain with an attached persistent volume. * Configure custom identity and custom trust on server template - * Don't explicitly set the SSL port on the server template. + * Don't explicitly set the SSL port on the server template. * The default will be set to 8100. - * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory - * after administration server pod is started so that it can be accessible + * Put the IdentityKeyStore.jks and TrustKeyStore.jks on /shared directory + * after administration server pod is started so that it can be accessible * from all managed server pods - * Once all servers are started get the JNDI initial context using cluster + * Once all servers are started get the JNDI initial context using cluster * service URL with t3s protocol. - * Repeat the same after scaling the cluster + * Repeat the same after scaling the cluster */ @TestMethodOrder(MethodOrderer.OrderAnnotation.class) @@ -68,8 +68,8 @@ class ItMiiCustomSslStore { private static String domainNamespace = null; private static int replicaCount = 2; private static final String domainUid = "mii-custom-ssl"; - private static String pvName = domainUid + "-pv"; - private static String pvcName = domainUid + "-pvc"; + private static String pvName = domainUid + "-pv"; + private static String pvcName = domainUid + "-pvc"; private static final String adminServerPodName = domainUid + "-admin-server"; private static final String managedServerPrefix = domainUid + "-managed-server"; private static LoggingFacade logger = null; @@ -78,7 +78,7 @@ class ItMiiCustomSslStore { /** * Install Operator. * Create domain resource definition. - * @param namespaces list of namespaces created by the IntegrationTestWatcher by the + * @param namespaces list of namespaces created by the IntegrationTestWatcher by the * JUnit engine parameter resolution mechanism */ @BeforeAll @@ -93,7 +93,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Creating unique namespace for Domain"); assertNotNull(namespaces.get(1), "Namespace list is null"); domainNamespace = namespaces.get(1); - + // Create the repo secret to pull the image // this secret is used only for non-kind cluster createOcirRepoSecret(domainNamespace); @@ -102,11 +102,11 @@ public static void initAll(@Namespaces(2) List namespaces) { installAndVerifyOperator(opNamespace, domainNamespace); // create secret for admin credential with special characters - // the resultant password is ##W%*}!"'"`']\\\\//1$$~x + // the resultant password is ##W%*}!"'"`']\\\\//1$$~x // let the user name be something other than weblogic say wlsadmin logger.info("Create secret for admin credentials"); String adminSecretName = "weblogic-credentials"; - assertDoesNotThrow(() -> createDomainSecret(adminSecretName, + assertDoesNotThrow(() -> createDomainSecret(adminSecretName, "wlsadmin", "##W%*}!\"'\"`']\\\\//1$$~x", domainNamespace), String.format("createSecret failed for %s", adminSecretName)); @@ -151,7 +151,7 @@ public static void initAll(@Namespaces(2) List namespaces) { logger.info("Check admin service and pod {0} is created in namespace {1}", adminServerPodName, domainNamespace); checkPodReadyAndServiceExists(adminServerPodName, domainUid, domainNamespace); - // Generate JKS Keystore using openssl before + // Generate JKS Keystore using openssl before // managed server services and pods are ready generateJksStores(); assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -177,7 +177,7 @@ public static void initAll(@Namespaces(2) List namespaces) { @Test @DisplayName("Verify JNDI Context can be accessed using t3s cluster URL") void testMiiGetCustomSSLContext() { - + // build the standalone Client on Admin pod after rolling restart String destLocation = "/u01/SslTestClient.java"; assertDoesNotThrow(() -> copyFileToPod(domainNamespace, @@ -185,7 +185,7 @@ void testMiiGetCustomSSLContext() { Paths.get(RESOURCE_DIR, "ssl", "SslTestClient.java"), Paths.get(destLocation))); runJavacInsidePod(adminServerPodName, domainNamespace, destLocation); - + runClientOnAdminPod(); boolean psuccess = assertDoesNotThrow(() -> From 50b45c6acca1613b89703a1049a30eed4359abad Mon Sep 17 00:00:00 2001 From: sankar Date: Tue, 14 Sep 2021 16:51:52 -0700 Subject: [PATCH 15/15] remove commented out tests --- integration-tests/pom.xml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index d8f2e629fde..51dd278d6eb 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -309,22 +309,17 @@ false - - **/ItMiiAuxiliaryImage, - **/ItMiiAuxiliaryImageCluster, - **/ItMiiSampleWlsAux, - - **/ItMiiServiceMigration, - **/ItConfigDistributionStrategy, **/ItCrossDomainTransaction, **/ItElasticLogging, **/ItElasticLoggingFluentd, **/ItIntrospectVersion, - **/ItCrossDomainTransaction, **/ItIstioDomainInPV, **/ItIstioMiiDomain, - + **/ItMiiAuxiliaryImage, + **/ItMiiAuxiliaryImageCluster, + **/ItMiiSampleWlsAux, + **/ItMiiServiceMigration, **/ItMiiDomain, **/ItMiiDynamicUpdate, **/ItMiiSampleWlsMain, @@ -335,7 +330,6 @@ **/ItProductionSecureMode, **/ItWlsSamples, **/ItSessionMigration, - **/ItSystemResOverrides