Skip to content

Commit dd6e24e

Browse files
author
Sankar Periyathambi Neelakandan
committed
fix for vanaja's comments
1 parent 49d0944 commit dd6e24e

File tree

4 files changed

+33
-46
lines changed

4 files changed

+33
-46
lines changed

integration-tests/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,23 +180,21 @@ K8sTestUtils - uses k8s java client api, this is used only for delete domain use
180180

181181
* Maven and latest Git should be in PATH
182182
* export JAVA_HOME
183-
* export WEBLOGIC_IMAGE_NAME and WEBLOGIC_IMAGE_TAG if different from middleware/weblogic and 12.2.1.3
183+
* export WEBLOGIC_IMAGE_NAME and WEBLOGIC_IMAGE_TAG if different from container-registry.oracle.com/middleware/weblogic and 12.2.1.3
184184
* Setup docker access to WebLogic 12c Images
185185

186186
Method 1
187-
- Setup a personal account on hub.docker.com
188-
- Then sign in to hub.docker.com and signup for access to WebLogic 12c Images via https://hub.docker.com/_/oracle-weblogic-server-12c
187+
- Setup a personal account on container-registry.oracle.com
188+
- Then sign in to container-registry.oracle.com and signup for access to WebLogic 12.2.1.3 images from container-registry.oracle.com/middleware/weblogic:12.2.1.3
189189
- Then export the following before running the tests:
190190
```
191-
export DOCKER_USERNAME=<docker_username>
192-
export DOCKER_PASSWORD=<docker_password>
193-
export DOCKER_EMAIL=<docker_email>
191+
export OCR_USERNAME=<ocr_username>
192+
export OCR_PASSWORD=<ocr_password>
194193
```
195194

196195
Method 2
197-
- Make sure the weblogic image i.e. middleware/weblogic:12.2.1.3 already exists locally in a docker repository the k8s cluster can access
196+
- Make sure the weblogic image i.e. container-registry.oracle.com/middleware/weblogic:12.2.1.3 already exists locally in a docker repository the k8s cluster can access
198197
- Make sure the weblogic image has patch p29135930 (required for the WebLogic Kubernetes Operator).
199-
- If not, see [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-patch-wls-for-k8s].
200198

201199

202200
* Command to run the tests:

integration-tests/src/test/java/oracle/kubernetes/operator/ITPodsRestart.java

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -208,34 +208,32 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
208208
+ "/weblogick8s/middleware/weblogic:duplicate");
209209

210210
if (BaseTest.SHARED_CLUSTER) {
211-
// unskip this code once OWLS-74986 is fixed.
212-
if (false) {
213-
String newImage =
214-
System.getenv("REPO_REGISTRY") + "/weblogick8s/middleware/weblogic:duplicate";
215-
// tag image with repo name
216-
String tag =
217-
"docker tag " + getWeblogicImageName() + ":" + getWeblogicImageTag() + " " + newImage;
218-
TestUtils.ExecAndPrintLog(tag);
219-
TestUtils.ExecAndPrintLog("docker images");
220-
221-
// login and push image to ocir
222-
TestUtils.loginAndPushImageToOCIR(newImage);
223-
224-
// create ocir registry secret in the same ns as domain which is used while pulling the
225-
// image
226-
TestUtils.createDockerRegistrySecret(
227-
"docker-store",
228-
System.getenv("REPO_REGISTRY"),
229-
System.getenv("REPO_USERNAME"),
230-
System.getenv("REPO_PASSWORD"),
231-
System.getenv("REPO_EMAIL"),
232-
domain.getDomainNS());
233-
234-
// apply new domain yaml and verify pod restart
235-
domain.verifyDomainServerPodRestart(
236-
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
237-
"\"" + newImage + "\"");
238-
}
211+
String newImage =
212+
System.getenv("REPO_REGISTRY") + "/weblogick8s/middleware/weblogic:duplicate";
213+
// tag image with repo name
214+
String tag =
215+
"docker tag " + getWeblogicImageName() + ":" + getWeblogicImageTag() + " " + newImage;
216+
TestUtils.ExecAndPrintLog(tag);
217+
TestUtils.ExecAndPrintLog("docker images");
218+
219+
// login and push image to ocir
220+
TestUtils.loginAndPushImageToOCIR(newImage);
221+
222+
// create ocir registry secret in the same ns as domain which is used while pulling the
223+
// image
224+
TestUtils.createDockerRegistrySecret(
225+
"docker-store",
226+
System.getenv("REPO_REGISTRY"),
227+
System.getenv("REPO_USERNAME"),
228+
System.getenv("REPO_PASSWORD"),
229+
System.getenv("REPO_EMAIL"),
230+
domain.getDomainNS());
231+
232+
// apply new domain yaml and verify pod restart
233+
domain.verifyDomainServerPodRestart(
234+
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
235+
"\"" + newImage + "\"");
236+
239237
} else {
240238
TestUtils.exec(
241239
"docker tag "

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,7 @@ public void verifyHasClusterServiceChannelPort(String protocol, int port, String
363363
public void deployWebAppViaREST(
364364
String webappName, String webappLocation, String username, String password) throws Exception {
365365
StringBuffer cmd = new StringBuffer();
366-
if (!BaseTest.SHARED_CLUSTER) {
367-
cmd.append("curl --noproxy '*' ");
368-
} else {
369-
cmd.append("curl ");
370-
}
371-
cmd.append("--silent --user ")
366+
cmd.append("curl --noproxy '*' --silent --user ")
372367
.append(username)
373368
.append(":")
374369
.append(password)
@@ -386,7 +381,6 @@ public void deployWebAppViaREST(
386381
.append("/management/weblogic/latest/edit/appDeployments")
387382
.append(" --write-out %{http_code} ");
388383
logger.info("Command to deploy webapp " + cmd);
389-
logger.info(getHostNameForCurl());
390384
ExecResult result = TestUtils.exec(cmd.toString());
391385
String output = result.stdout().trim();
392386
logger.info("curl output " + output + " \n err " + result.stderr());

integration-tests/src/test/resources/setupenv.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ if [ "$SHARED_CLUSTER" = "true" ]; then
237237
echo "Provide Docker login details using REPO_REGISTRY, REPO_USERNAME, REPO_PASSWORD & REPO_EMAIL env variables to push the Operator image to the repository."
238238
exit 1
239239
fi
240-
241-
echo "login to $REPO_REGISTRY"
242-
docker login $REPO_REGISTRY -u $REPO_USERNAME -p $REPO_PASSWORD
243240

244241
echo "Creating Registry Secret"
245242
kubectl create secret docker-registry $IMAGE_PULL_SECRET_OPERATOR \

0 commit comments

Comments
 (0)