Skip to content

Commit be06bfc

Browse files
authored
Merge pull request #1165 from oracle/owls75969
skip test which depends on thinclient.jar for slim image
2 parents 2a10f11 + 74ddf87 commit be06bfc

File tree

4 files changed

+36
-146
lines changed

4 files changed

+36
-146
lines changed

integration-tests/README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This documentation describes the functional use cases that are covered in integr
77
The tests currently run in three modes: "shared cluster", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the `SHARED_CLUSTER` and `JENKINS` environment variables described below. The default is "standalone".
88

99
* "Standalone" Oracle Linux, i.e, run the tests manually with the `mvn` command.
10-
* Shared cluster - http://build.weblogick8s.org:8080/job/weblogic-kubernetes-operator-quicktest/
11-
* Jenkins - http://wls-jenkins.us.oracle.com/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/ - Jenkins Run is restricted to Oracle Internal development process.
10+
* Shared cluster(remote k8s cluster) - http://build.weblogick8s.org:8080/job/weblogic-kubernetes-operator-quicktest/
11+
* Jenkins - http://wls-jenkins.us.oracle.com/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/ - Jenkins Run is restricted to Oracle Internal development process.
1212

1313
Shared cluster runs only Quick test use cases, Jenkins runs both Quick and Full test use cases.
1414

@@ -183,18 +183,18 @@ K8sTestUtils - uses k8s java client api, this is used only for delete domain use
183183
* 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

186-
Method 1
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
189-
- Then export the following before running the tests:
186+
* Method 1
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
189+
- Then export the following before running the tests:
190190
```
191191
export OCR_USERNAME=<ocr_username>
192192
export OCR_PASSWORD=<ocr_password>
193193
```
194194

195-
Method 2
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
197-
- Make sure the weblogic image has patch p29135930 (required for the WebLogic Kubernetes Operator).
195+
* Method 2
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
197+
- Make sure the weblogic image has patch p29135930 (required for the WebLogic Kubernetes Operator).
198198

199199

200200
* Command to run the tests:
@@ -296,20 +296,19 @@ JUnit test results can be seen at "integration-tests/target/failsafe-reports/TES
296296

297297
# How to run JRF domain In Operator related tests
298298
* Setup docker access to FMW Infrastructure 12c Image and Oracle Database 12c Image
299-
300-
Method 1
301-
- Setup a personal account on container-registry.oracle.com
302-
- Then sign in to container-registry.oracle.com and accept license for access to Oracle Database 12c Images: **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_**
303-
- And get access to FMW Infrastructure 12c Image: **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_**
304-
- export the following before running the tests:
299+
* Method 1
300+
- Setup a personal account on container-registry.oracle.com
301+
- Then sign in to container-registry.oracle.com and accept license for access to Oracle Database 12c Images: **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_**
302+
- And get access to FMW Infrastructure 12c Image: **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_**
303+
- export the following before running the tests:
305304
```
306305
export REPO_USERNAME=<ocr_username>
307306
export REPO_PASSWORD=<ocr_password>
308307
export REPO_EMAIL=<ocr_email>
309308
```
310309
311-
Method 2
312-
- Make sure the FMW Infrastructure image i.e. **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_** and the Oracle database image i.e. **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_** already exist locally in a docker repository the k8s cluster can access
310+
* Method 2
311+
- Make sure the FMW Infrastructure image i.e. **_container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3_** and the Oracle database image i.e. **_container-registry.oracle.com/database/enterprise:12.2.0.1-slim_** already exist locally in a docker repository the k8s cluster can access
313312
314313
* Command to run the tests:
315314
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ public void testAdminT3Channel(Domain domain) throws Exception {
538538

539539
/**
540540
* Verify t3channel port by a JMS connection.
541-
*
541+
* This method is not used. See OWLS-76081
542542
* @throws Exception exception
543543
*/
544544
public void testAdminT3ChannelWithJms(Domain domain) throws Exception {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ public void testAutoAndCustomSitConfigOverrides() throws Exception {
468468
domain11 = TestUtils.createDomain(domainMap);
469469
domain11.verifyDomainCreated();
470470
testBasicUseCases(domain11);
471-
testAdminT3ChannelWithJms(domain11);
471+
// OWLS-76081 - commenting the below check as its not a generic usecase that works for all images, it needs wlthint3client.jar
472+
// testAdminT3ChannelWithJms(domain11);
472473
testCompletedSuccessfully = true;
473474

474475
} finally {

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

Lines changed: 17 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,6 @@
22
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44

5-
function clean_jenkins {
6-
echo "Cleaning."
7-
/usr/local/packages/aime/ias/run_as_root "${PROJECT_ROOT}/src/integration-tests/bash/clean_docker_k8s.sh -y"
8-
}
9-
10-
function setup_jenkins {
11-
echo "Setting up."
12-
/usr/local/packages/aime/ias/run_as_root "sh ${PROJECT_ROOT}/src/integration-tests/bash/install_docker_k8s.sh -y -u wls -v ${K8S_VERSION}"
13-
if [ $? -ne 0 ]; then
14-
echo "k8s installation is not successful"
15-
exit 1
16-
fi
17-
set +x
18-
. ~/.dockerk8senv
19-
set -x
20-
id
21-
22-
docker images
23-
24-
if [ "$JRF_ENABLED" = true ] ; then
25-
pull_tag_images_jrf
26-
else
27-
pull_tag_images
28-
fi
29-
30-
export JAR_VERSION="`grep -m1 "<version>" pom.xml | cut -f2 -d">" | cut -f1 -d "<"`"
31-
# create a docker image for the operator code being tested
32-
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy -t "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" --build-arg VERSION=$JAR_VERSION --no-cache=true .
33-
docker tag "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" weblogic-kubernetes-operator:latest
34-
35-
docker images
36-
37-
echo "Helm installation starts"
38-
wget -q -O /tmp/helm-v2.8.2-linux-amd64.tar.gz https://kubernetes-helm.storage.googleapis.com/helm-v2.8.2-linux-amd64.tar.gz
39-
mkdir /tmp/helm
40-
tar xzf /tmp/helm-v2.8.2-linux-amd64.tar.gz -C /tmp/helm
41-
chmod +x /tmp/helm/linux-amd64/helm
42-
/usr/local/packages/aime/ias/run_as_root "cp /tmp/helm/linux-amd64/helm /usr/bin/"
43-
rm -rf /tmp/helm
44-
helm init
45-
echo "Helm is configured."
46-
}
47-
48-
function docker_login {
49-
50-
set +x
51-
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ]; then
52-
echo "DOCKER_USERNAME and DOCKER_PASSWORD not set !!!"
53-
exit 1
54-
fi
55-
56-
if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then
57-
echo "Creating Docker Secret"
58-
59-
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
60-
--docker-server=index.docker.io/v1/ \
61-
--docker-username=$DOCKER_USERNAME \
62-
--docker-password=$DOCKER_PASSWORD \
63-
--dry-run -o yaml | kubectl apply -f -
64-
65-
echo "Checking Secret"
66-
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
67-
if [ "$SECRET" != "1" ]; then
68-
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
69-
exit 1
70-
fi
71-
# below docker pull is needed to get wlthint3client.jar from image to put in the classpath
72-
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
73-
fi
74-
set -x
75-
76-
}
77-
785
function setup_shared_cluster {
796
echo "Perform setup for running on shared cluster"
807
echo "Install tiller"
@@ -103,7 +30,7 @@ function clean_shared_cluster {
10330
${PROJECT_ROOT}/src/integration-tests/bash/cleanup.sh
10431
}
10532

106-
function pull_tag_images {
33+
function create_image_pull_secret_wl {
10734

10835
set +x
10936
if [ -z "$OCR_USERNAME" ] || [ -z "$OCR_PASSWORD" ]; then
@@ -115,7 +42,6 @@ function pull_tag_images {
11542

11643
if [ -n "$OCR_USERNAME" ] && [ -n "$OCR_PASSWORD" ]; then
11744
echo "Creating Docker Secret"
118-
11945
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
12046
--docker-server=${OCR_SERVER}/ \
12147
--docker-username=$OCR_USERNAME \
@@ -128,11 +54,6 @@ function pull_tag_images {
12854
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
12955
exit 1
13056
fi
131-
# below docker pull is needed to get wlthint3client.jar from image to put in the classpath
132-
# echo "docker login -u $OCR_USERNAME -p $OCR_PASSWORD ${OCR_SERVER}"
133-
docker login -u $OCR_USERNAME -p $OCR_PASSWORD ${OCR_SERVER}
134-
# echo "docker pull $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC"
135-
docker pull $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC
13657
fi
13758
set -x
13859
}
@@ -153,7 +74,7 @@ function pull_tag_images_jrf {
15374
fi
15475

15576
# reuse the create secret logic
156-
pull_tag_images
77+
create_image_pull_secret_wl
15778

15879
# pull fmw infra images
15980
docker pull $IMAGE_NAME_FMWINFRA:$IMAGE_TAG_FMWINFRA
@@ -164,17 +85,6 @@ function pull_tag_images_jrf {
16485
set -x
16586
}
16687

167-
function get_wlthint3client_from_image {
168-
# Get wlthint3client.jar from image
169-
id=$(docker create $IMAGE_NAME_WEBLOGIC:$IMAGE_TAG_WEBLOGIC)
170-
docker cp $id:/u01/oracle/wlserver/server/lib/wlthint3client.jar $SCRIPTPATH
171-
if [ ! "$?" = "0" ] ; then
172-
echo "Docker Copy failed for wlthint3client.jar"
173-
exit 1
174-
fi
175-
docker rm -v $id
176-
177-
}
17888
export OCR_SERVER="${OCR_SERVER:-container-registry.oracle.com}"
17989
export WLS_IMAGE_URI=/middleware/weblogic
18090
export SCRIPTPATH="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )"
@@ -258,52 +168,35 @@ if [ "$SHARED_CLUSTER" = "true" ]; then
258168
echo "When running in shared cluster option, provide DNS name or IP of a Kubernetes worker node using K8S_NODEPORT_HOST env variable"
259169
exit 1
260170
fi
261-
pull_tag_images
171+
create_image_pull_secret_wl
262172

263173
fi
264174
setup_shared_cluster
265-
get_wlthint3client_from_image
266175
docker images
267176

268177
elif [ "$JENKINS" = "true" ]; then
269178

270179
echo "Test Suite is running on Jenkins and k8s is running locally on the same node."
180+
docker images
271181

272-
# External customizable env vars unique to Jenkins:
273-
274-
export docker_pass=${docker_pass:?}
275-
export M2_HOME=${M2_HOME:?}
276-
export K8S_VERSION=${K8S_VERSION}
277-
278-
clean_jenkins
279-
280-
setup_jenkins
281-
282-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $PV_ROOT"
283-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $RESULT_ROOT"
284-
285-
# 777 is needed because this script, k8s pods, and/or jobs may need access.
286-
287-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $RESULT_ROOT/acceptance_test_tmp"
288-
/usr/local/packages/aime/ias/run_as_root "chmod 777 $RESULT_ROOT/acceptance_test_tmp"
289-
290-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $RESULT_ROOT/acceptance_test_tmp_archive"
291-
/usr/local/packages/aime/ias/run_as_root "chmod 777 $RESULT_ROOT/acceptance_test_tmp_archive"
292-
293-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $PV_ROOT/acceptance_test_pv"
294-
/usr/local/packages/aime/ias/run_as_root "chmod 777 $PV_ROOT/acceptance_test_pv"
182+
if [ "$JRF_ENABLED" = true ] ; then
183+
pull_tag_images_jrf
184+
else
185+
create_image_pull_secret_wl
186+
fi
295187

296-
/usr/local/packages/aime/ias/run_as_root "mkdir -p $PV_ROOT/acceptance_test_pv_archive"
297-
/usr/local/packages/aime/ias/run_as_root "chmod 777 $PV_ROOT/acceptance_test_pv_archive"
188+
export JAR_VERSION="`grep -m1 "<version>" pom.xml | cut -f2 -d">" | cut -f1 -d "<"`"
189+
# create a docker image for the operator code being tested
190+
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy -t "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" --build-arg VERSION=$JAR_VERSION --no-cache=true .
191+
docker tag "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" weblogic-kubernetes-operator:latest
298192

299-
if [ "$JRF_ENABLED" = false ]; then
300-
get_wlthint3client_from_image
301-
fi
193+
docker images
194+
302195
else
303196
if [ "$JRF_ENABLED" = true ] ; then
304197
pull_tag_images_jrf
305198
else
306-
pull_tag_images
199+
create_image_pull_secret_wl
307200
fi
308201

309202
#docker rmi -f $(docker images -q -f dangling=true)
@@ -314,8 +207,5 @@ else
314207
export JAR_VERSION="`grep -m1 "<version>" pom.xml | cut -f2 -d">" | cut -f1 -d "<"`"
315208
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy -t "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" --build-arg VERSION=$JAR_VERSION --no-cache=true .
316209
docker tag "${IMAGE_NAME_OPERATOR}:${IMAGE_TAG_OPERATOR}" weblogic-kubernetes-operator:latest
317-
318-
if [ "$JRF_ENABLED" = false ]; then
319-
get_wlthint3client_from_image
320-
fi
210+
321211
fi

0 commit comments

Comments
 (0)