You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integration-tests/README.md
+37-53Lines changed: 37 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Integration Tests for Operator
2
2
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.
4
4
5
5
# Environments
6
6
@@ -12,13 +12,13 @@ The tests currently runs in three modes, "Wercker", "Jenkins", and "standalone"
12
12
13
13
# Use Cases
14
14
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:
16
16
17
17
* create operator operator1 which manages default and test1 namespaces, verify its deployed successfully, pod created, operator Ready and verify external REST service if configured
18
18
* create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
19
19
* verify admin external service by accessing admin REST endpoint with nodeport in URL
20
20
* 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
22
22
* 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
23
23
* 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.)
24
24
* Operator life cycle(destroy and create) should not impact the running domain
@@ -49,16 +49,18 @@ Directory structure of source code:
49
49
50
50
A new module "integration-tests" is added to the maven project weblogic-kubernetes-operator.
51
51
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
54
54
weblogic-kubernetes-operator/integration-tests/src/test/resources - properties files(see Configuration Files section) and other scripts
55
55
56
56
Directory structure used for the test run:
57
57
58
58
Main external env vars:
59
59
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 |
62
64
63
65
Defaults for RESULT_ROOT & PV_ROOT:
64
66
@@ -78,7 +80,8 @@ Defaults for RESULT_ROOT & PV_ROOT:
@@ -91,11 +94,12 @@ Below configuration files are used:
91
94
```
92
95
src/integration-tests/resources/OperatorIT.properties - This file is used for configuring common attributes for all integration tests
93
96
```
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
+
99
103
100
104
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.
101
105
@@ -163,52 +167,32 @@ set the optional env vars described below
163
167
164
168
The tests accepts optional env var overrides:
165
169
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. |
188
180
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
-
197
181
The following additional overrides are currently only used when
198
182
WERCKER=true:
199
183
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 ''.
209
191
192
+
Command to run the tests:
193
+
```
210
194
mvn clean verify -P java-integration-tests 2>&1 | tee log.txt
211
-
195
+
```
212
196
Successful run will have the output like below:
213
197
```
214
198
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 970.765 s - in oracle.kubernetes.operator.ITSingleDomain
0 commit comments