Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -38,6 +38,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.OCIR_SECRET_NAME;
import static oracle.weblogic.kubernetes.actions.ActionConstants.APP_DIR;
Expand Down Expand Up @@ -270,8 +272,8 @@ private static void createAndVerifyDomain(String domImage) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -32,7 +32,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;

import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_NAME;
Expand Down Expand Up @@ -280,8 +282,8 @@ private void createDomain(String domainNamespace) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.COPY_WLS_LOGGING_EXPORTER_FILE_NAME;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.ELASTICSEARCH_HOST;
Expand Down Expand Up @@ -364,8 +366,8 @@ private static void createAndVerifyDomain(String miiImage) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.ELASTICSEARCH_HOST;
import static oracle.weblogic.kubernetes.TestConstants.ELASTICSEARCH_HTTPS_PORT;
Expand Down Expand Up @@ -327,7 +329,8 @@ private static void createAndVerifyDomain(String miiImage) {
logger.info("Create secret for admin credentials");
final String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePasswordElk(adminSecretName, domainNamespace,
"weblogic", "welcome1", elasticSearchHost, elasticSearchPort),
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT,
elasticSearchHost, elasticSearchPort),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Oracle and/or its affiliates.
// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand All @@ -25,6 +25,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TO_USE_IN_SPEC;
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_NAME;
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_TAG;
Expand Down Expand Up @@ -163,8 +165,8 @@ void testFmwBigCMModelInImage() {
assertDoesNotThrow(() -> createSecretWithUsernamePassword(
adminSecretName,
jrfDomainNamespace,
"weblogic",
"welcome1"),
ADMIN_USERNAME_DEFAULT,
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", adminSecretName));

// create encryption secret
Expand All @@ -191,7 +193,7 @@ void testFmwBigCMModelInImage() {
assertDoesNotThrow(() -> createOpsswalletpasswordSecret(
opsswalletpassSecretName,
jrfDomainNamespace,
"welcome1"),
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", opsswalletpassSecretName));

logger.info("Create an image with jrf model file");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Oracle and/or its affiliates.
// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -190,7 +190,7 @@ private void createFmwDomainAndVerify() {
assertDoesNotThrow(() -> createOpsswalletpasswordSecret(
opsswalletpassSecretName,
domainNamespace,
"welcome1"),
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", opsswalletpassSecretName));

logger.info("Create an image with jrf model file");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -26,6 +26,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TO_USE_IN_SPEC;
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_NAME;
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_TAG;
Expand Down Expand Up @@ -168,8 +170,8 @@ void testFmwModelInImage() {
assertDoesNotThrow(() -> createSecretWithUsernamePassword(
adminSecretName,
fmwDomainNamespace,
"weblogic",
"welcome1"),
ADMIN_USERNAME_DEFAULT,
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", adminSecretName));

// create encryption secret
Expand All @@ -196,7 +198,7 @@ void testFmwModelInImage() {
assertDoesNotThrow(() -> createOpsswalletpasswordSecret(
opsswalletpassSecretName,
fmwDomainNamespace,
"welcome1"),
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", opsswalletpassSecretName));

logger.info("Create an image with jrf model file");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -33,7 +33,9 @@
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_NAME;
Expand Down Expand Up @@ -137,7 +139,7 @@ public static void initAll(@Namespaces(5) List<String> namespaces) {
.helmParams(opHelmParams)
.javaLoggingLevel(("FINE"));
assertTrue(upgradeAndVerifyOperator(opNamespace, opParams),
"Failed to upgrade operator to FINE logging leve");
"Failed to upgrade operator to FINE logging level");
}

private static void createSecrets(String domainNamespace) {
Expand All @@ -154,7 +156,8 @@ private static void createSecrets(String domainNamespace) {
// create secret for admin credentials
logger.info("Creating secret for admin credentials");

createSecretWithUsernamePassword(adminSecretName, domainNamespace, "weblogic", "welcome1");
createSecretWithUsernamePassword(adminSecretName, domainNamespace,
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT);

// create encryption secret
logger.info("Creating encryption secret");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -38,6 +38,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.OCIR_SECRET_NAME;
import static oracle.weblogic.kubernetes.actions.ActionConstants.APP_DIR;
Expand Down Expand Up @@ -279,8 +281,8 @@ private static void createAndVerifyDomain(String domImage) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -33,7 +33,9 @@
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
Expand Down Expand Up @@ -266,8 +268,8 @@ private static void createAndVerifyDomain(String domImage) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainInImageNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainInImageNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -157,8 +157,8 @@ void testIstioModelInImage() {
assertDoesNotThrow(() -> createSecretWithUsernamePassword(
adminSecretName,
domainNamespace,
"weblogic",
"welcome1"),
ADMIN_USERNAME_DEFAULT,
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Oracle and/or its affiliates.
// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -249,8 +249,8 @@ private void setupIstioModelInImageDomain(String miiImage, String domainNamespac
assertDoesNotThrow(() -> createSecretWithUsernamePassword(
adminSecretName,
domainNamespace,
"weblogic",
"welcome1"),
ADMIN_USERNAME_DEFAULT,
ADMIN_PASSWORD_DEFAULT),
String.format("createSecret failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Oracle and/or its affiliates.
// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -37,7 +37,9 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_APP_NAME;
Expand Down Expand Up @@ -256,7 +258,8 @@ private static void createAndVerifyMiiDomain(String miiImage) {
// create secret for admin credentials
logger.info("Creating secret for admin credentials");
String adminSecretName = "weblogic-credentials";
createSecretWithUsernamePassword(adminSecretName, domainNamespace, "weblogic", "welcome1");
createSecretWithUsernamePassword(adminSecretName, domainNamespace,
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT);

// create encryption secret
logger.info("Creating encryption secret");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -38,6 +38,8 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
import static oracle.weblogic.kubernetes.TestConstants.MANAGED_SERVER_NAME_BASE;
Expand Down Expand Up @@ -239,8 +241,8 @@ private static void createAndVerifyDomain(String domImage) {
// create secret for admin credentials
logger.info("Create secret for admin credentials");
String adminSecretName = "weblogic-credentials";
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, domainNamespace,
"weblogic", "welcome1"),
assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName,
domainNamespace, ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT),
String.format("create secret for admin credentials failed for %s", adminSecretName));

// create encryption secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020, 2021, Oracle and/or its affiliates.
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.weblogic.kubernetes;
Expand Down Expand Up @@ -612,7 +612,7 @@ void testMiiDeleteAppChangeDBUrlWithCommitUpdateAndRoll() {
Path pathToUndeployAppYaml = Paths.get(WORK_DIR + "/undeployapp.yaml");
String yamlToUndeployApp = "appDeployments:\n"
+ " Application:\n"
+ " !myear:";
+ " '!myear':";

assertDoesNotThrow(() -> Files.write(pathToUndeployAppYaml, yamlToUndeployApp.getBytes()));

Expand Down
Loading