Skip to content

Commit 5c08cae

Browse files
format changes
1 parent 76a1064 commit 5c08cae

File tree

1 file changed

+37
-53
lines changed

1 file changed

+37
-53
lines changed

integration-tests/README.md

Lines changed: 37 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Integration Tests for Operator
22

3-
This documentation describes the functional use cases that are covered in integration testing for Weblogic Operator. The tests are written in java(Junit tests) and driven by maven profile. Currently run.sh is used to run integration tests for Operator. All the use cases covered in run.sh will be covered in java integration tests. Currently, QUICK_TEST use cases and some of non-quick test(till domain4) use cases are covered in java tests.
3+
This documentation describes the functional use cases that are covered in integration testing for Weblogic Operator. The tests are written in java(Junit tests) and driven by maven profile. All the use cases covered in run.sh will be covered in java integration tests. Currently, QUICKTEST use cases and some of non-quick test(till domain4) use cases are covered in java tests.
44

55
# Environments
66

@@ -12,13 +12,13 @@ The tests currently runs in three modes, "Wercker", "Jenkins", and "standalone"
1212

1313
# Use Cases
1414

15-
Currently java integration tests cover only QUICK_TEST use cases from run.sh. The below are the use cases:
15+
Currently java integration tests cover all QUICKTEST and some non-QUICKTEST use cases from run.sh. The below are the use cases:
1616

1717
* create operator operator1 which manages default and test1 namespaces, verify its deployed successfully, pod created, operator Ready and verify external REST service if configured
1818
* create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
1919
* verify admin external service by accessing admin REST endpoint with nodeport in URL
2020
* verify admin t3 channel port by exec into the admin pod and deploying webapp using the channel port for WLST
21-
* verify web app load balancing – TO DO, Apache, Voyager
21+
* verify web app load balancing
2222
* verify domain life cycle(destroy and create) should not any impact on Operator managing the domain and web app load balancing and admin external service
2323
* cluster scale up/down using Operator REST endpoint, webapp load balancing should adjust accordingly. (run.sh does scaling by editing the replicas in domain-custom-resource.yaml.)
2424
* Operator life cycle(destroy and create) should not impact the running domain
@@ -49,16 +49,18 @@ Directory structure of source code:
4949

5050
A new module "integration-tests" is added to the maven project weblogic-kubernetes-operator.
5151

52-
weblogic-kubernetes-operator/integration-tests - location of module pom.xml
53-
weblogic-kubernetes-operator/integration-tests/src/test/java - integration test(junit) classes and utility classes
52+
weblogic-kubernetes-operator/integration-tests - location of module pom.xml
53+
weblogic-kubernetes-operator/integration-tests/src/test/java - integration test(junit) classes and utility classes
5454
weblogic-kubernetes-operator/integration-tests/src/test/resources - properties files(see Configuration Files section) and other scripts
5555

5656
Directory structure used for the test run:
5757

5858
Main external env vars:
5959

60-
| RESULT_ROOT | Root path for local test files. |
61-
| PV_ROOT | Root NFS path behind PV/C directories. This must have permissions suitable for WL pods to add files |
60+
| Variable | Description |
61+
| --- | --- |
62+
| RESULT_ROOT | Root path for local test files. |
63+
| PV_ROOT | Root NFS path behind PV/C directories. This must have permissions suitable for WL pods to add files |
6264

6365
Defaults for RESULT_ROOT & PV_ROOT:
6466

@@ -78,7 +80,8 @@ Defaults for RESULT_ROOT & PV_ROOT:
7880
RESULT_ROOT/acceptance_test_tmp_archive/...
7981

8082
'Logical' to 'Physical' K8S PV/PVC mappings:
81-
| 'Logical' | 'Actual' |
83+
84+
| Logical | Actual |
8285
| --- | --- |
8386
| job.sh job: | /scratch <--> PV_ROOT on K8S machines |
8487
| domain pod: | /shared <--> PV_ROOT/acceptance_test_pv/persistentVolume-${domain_uid} on K8S machines |
@@ -91,11 +94,12 @@ Below configuration files are used:
9194
```
9295
src/integration-tests/resources/OperatorIT.properties - This file is used for configuring common attributes for all integration tests
9396
```
94-
baseDir=/scratch
95-
username=weblogic
96-
password=welcome1
97-
maxIterationsPod=50
98-
waitTimePod=5
97+
baseDir=/scratch
98+
username=weblogic
99+
password=welcome1
100+
maxIterationsPod=50
101+
waitTimePod=5
102+
99103

100104
src/integration-tests/resources/ITFirstOperator.properties - customized properties for operator. Any property can be provided here from create-weblogic-operator-inputs.yaml, for all the properties that are not defined here default values in create-weblogic-operator-inputs.yaml are used while generating the operator inputs yaml file.
101105

@@ -163,52 +167,32 @@ set the optional env vars described below
163167

164168
The tests accepts optional env var overrides:
165169

166-
| RESULT_ROOT | The root directory to use for the tests temporary files.
167-
See "Directory Configuration and Structure" below for
168-
defaults and a detailed description of test directories. |
169-
170-
| PV_ROOT | The root directory on the kubernetes cluster
171-
used for persistent volumes.
172-
See "Directory Configuration and Structure" below for
173-
defaults and a detailed description of test directories. |
174-
175-
| QUICKTEST | When set to "true", limits testing to a subset of
176-
of the tests. |
177-
178-
| WERCKER | Set to true if invoking from Wercker, set
179-
to false or "" if running stand-alone or from Jenkins.
180-
Default is "". |
181-
182-
| JENKINS | Set to true if invoking from Jenkins, set
183-
to false or "" if running stand-alone or from Wercker.
184-
Default is "". |
185-
186-
| NODEPORT_HOST | DNS name of a Kubernetes worker node.
187-
Default is the local host's hostname. |
170+
| Variable | Description |
171+
| --- | --- |
172+
| RESULT_ROOT | The root directory to use for the tests temporary files. See "Directory Configuration and Structure" for defaults and a detailed description of test directories. |
173+
| PV_ROOT | The root directory on the kubernetes cluster used for persistent volumes. See "Directory Configuration and Structure" for defaults and a detailed description of test directories. |
174+
| QUICKTEST | When set to "true", limits testing to a subset of the tests. |
175+
| WERCKER | Set to true if invoking from Wercker, set to false or "" if running stand-alone or from Jenkins. Default is "". |
176+
| JENKINS | Set to true if invoking from Jenkins, set to false or "" if running stand-alone or from Wercker. Default is "". |
177+
| NODEPORT_HOST | DNS name of a Kubernetes worker node. Default is the local host's hostname. |
178+
| BRANCH_NAME | Git branch name. Default is determined by calling 'git branch'. |
179+
| LEASE_ID | Set to a unique value to (A) periodically renew a lease on the k8s cluster that indicates that no other test run should attempt to use the cluster, and (B) delete this lease when the test completes. |
188180

189-
| BRANCH_NAME | Git branch name.
190-
Default is determined by calling 'git branch'. |
191-
192-
| LEASE_ID | Set to a unique value to (A) periodically renew a lease on
193-
the k8s cluster that indicates that no other test run
194-
should attempt to use the cluster, and (B)
195-
delete this lease when the test completes. |
196-
197181
The following additional overrides are currently only used when
198182
WERCKER=true:
199183

200-
IMAGE_TAG_OPERATOR Docker image tag for operator.
201-
Default generated based off the BRANCH_NAME.
202-
203-
IMAGE_NAME_OPERATOR Docker image name for operator.
204-
Default is wlsldi-v2.docker.oraclecorp.com/weblogic-operator
205-
206-
IMAGE_PULL_POLICY_OPERATOR Default 'Never'.
207-
IMAGE_PULL_SECRET_OPERATOR Default ''.
208-
IMAGE_PULL_SECRET_WEBLOGIC Default ''.
184+
| Variable | Description |
185+
| --- | --- |
186+
| IMAGE_TAG_OPERATOR | Docker image tag for operator. Default generated based off the BRANCH_NAME. |
187+
| IMAGE_NAME_OPERATOR | Docker image name for operator. Default is wlsldi-v2.docker.oraclecorp.com/weblogic-operator |
188+
| IMAGE_PULL_POLICY_OPERATOR | Default 'Never'. |
189+
| IMAGE_PULL_SECRET_OPERATOR | Default ''. |
190+
| IMAGE_PULL_SECRET_WEBLOGIC | Default ''.
209191

192+
Command to run the tests:
193+
```
210194
mvn clean verify -P java-integration-tests 2>&1 | tee log.txt
211-
195+
```
212196
Successful run will have the output like below:
213197
```
214198
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 970.765 s - in oracle.kubernetes.operator.ITSingleDomain

0 commit comments

Comments
 (0)