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
+44-50Lines changed: 44 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,49 +1,44 @@
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. 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.
4
4
5
5
# Environments
6
6
7
7
The tests currently runs in three modes, "Wercker", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the WERCKER and JENKINS environment variables described below. The default is "standalone".
8
8
9
-
"Standalone" Oracle Linux, i.e, run the tests manually with mvn command.
10
-
Wercker - https://app.wercker.com/Oracle/weblogic-kubernetes-operator/runs - integration-test-java is the pipeline name
Currently java integration tests cover only QUICK_TEST use cases from run.sh. The below are the use cases:
16
16
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
-
create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
19
-
verify admin external service by accessing admin REST endpoint with nodeport in URL
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
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
-
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
-
Operator life cycle(destroy and create) should not impact the running domain
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
+
* create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
19
+
* verify admin external service by accessing admin REST endpoint with nodeport in URL
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
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
+
* 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
+
* Operator life cycle(destroy and create) should not impact the running domain
25
25
26
26
Non-quick test use cases
27
27
28
-
keep the first domain and operator running
29
-
create another domain domain2 in default namespace and verify the domain by doing the checks 2 - 5 listed in quick test
30
-
destroy domain domain2
31
-
create another domain domain3 in test1 namespace and verify the domain by doing the checks 2 - 5 listed in quick test
32
-
destroy domain domain3
33
-
create another operator operator2 which manages test2 namespace and verify domain1 is not affected
34
-
create another domain domain4 in test2 namespace and verify the domain by doing the checks 2 - 5 listed in quick test
35
-
verify scaling for domain4 cluster from 2 to 3 servers and back to 2, plus verify no impact on domain1
36
-
cycle domain1 down and back up, plus verify no impact on domain4
37
-
38
-
create domain5 in the default namespace with startupControl="ADMIN", and verify that only admin server is created. on Jenkins, this domain will also test NFS instead of HOSTPATH PV storage – all the remaining use cases are covered in QA functional tests, so not adding these tests or will be added later.
39
-
40
-
create domain6 in the default namespace with pvReclaimPolicy="Recycle", and verify that the PV is deleted once the domain and PVC are deleted
41
-
42
-
test managed server 1 pod auto-restart in domain1
43
-
44
-
destroy domain1
45
-
46
-
test that create domain fails when its pv is already populated by a shutdown domain
28
+
* keep the first domain and operator running
29
+
* create another domain domain2 in default namespace and verify the domain by doing the checks 2 - 5 listed in quick test
30
+
* destroy domain domain2
31
+
* create another domain domain3 in test1 namespace and verify the domain by doing the checks 2 - 5 listed in quick test
32
+
* destroy domain domain3
33
+
* create another operator operator2 which manages test2 namespace and verify domain1 is not affected
34
+
* create another domain domain4 in test2 namespace and verify the domain by doing the checks 2 - 5 listed in quick test
35
+
* verify scaling for domain4 cluster from 2 to 3 servers and back to 2, plus verify no impact on domain1
36
+
* cycle domain1 down and back up, plus verify no impact on domain4
37
+
* create domain5 in the default namespace with startupControl="ADMIN", and verify that only admin server is created. on Jenkins, this domain will also test NFS instead of HOSTPATH PV storage
38
+
* create domain6 in the default namespace with pvReclaimPolicy="Recycle", and verify that the PV is deleted once the domain and PVC are deleted
39
+
* test managed server 1 pod auto-restart in domain1
40
+
* destroy domain1
41
+
* test that create domain fails when its pv is already populated by a shutdown domain
47
42
48
43
49
44
# Directory Configuration and Structure
@@ -62,8 +57,8 @@ Directory structure used for the test run:
62
57
63
58
Main external env vars:
64
59
65
-
RESULT_ROOT Root path for local test files.
66
-
PV_ROOT Root NFS path behind PV/C directories. This must have permissions suitable for WL pods to add files (default UID 1000 group ???)
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 |
67
62
68
63
Defaults for RESULT_ROOT & PV_ROOT:
69
64
@@ -83,40 +78,39 @@ Defaults for RESULT_ROOT & PV_ROOT:
83
78
RESULT_ROOT/acceptance_test_tmp_archive/...
84
79
85
80
'Logical' to 'Physical' K8S PV/PVC mappings:
86
-
'Logical' 'Actual'
87
-
job.sh job: /scratch <--> PV_ROOT on K8S machines
88
-
domain pod: /shared <--> PV_ROOT/acceptance_test_pv/persistentVolume-${domain_uid} on K8S machines
A module "integration-tests" is added in maven weblogic-kubernetes-operator project.
93
89
94
90
Below configuration files are used:
91
+
```
95
92
src/integration-tests/resources/OperatorIT.properties - This file is used for configuring common attributes for all integration tests
93
+
```
96
94
baseDir=/scratch
97
-
#wls admin user
98
95
username=weblogic
99
96
password=welcome1
100
97
maxIterationsPod=50
101
98
waitTimePod=5
102
99
103
-
src/integration-tests/resources/ITFirstOperator.properties - customized properties for operator
104
-
#any property can be provided here from create-weblogic-operator-inputs.yaml
105
-
#for all the properties that are not defined here, the default values in create-weblogic-operator-inputs.yaml
106
-
# used while generating the operator inputs yaml file
100
+
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.
107
101
102
+
```
108
103
serviceAccount= weblogic-operator
109
104
namespace= weblogic-operator1
110
105
targetNamespaces= default
111
106
#if SELF_SIGNED_CERT, externalSans value is set to the local host name if not provided here
112
107
externalRestOption= SELF_SIGNED_CERT
113
108
elkIntegrationEnabled= false
109
+
```
114
110
115
-
src/integration-tests/resources/ITFirstDomain.properties - customized properties for domain
116
-
#any property can be provided here from create-weblogic-domain-inputs.yaml
117
-
#for all the properties that are not defined here, the default values in create-weblogic-domain-inputs.yaml are
118
-
# used while generating the domain inputs yaml file
111
+
src/integration-tests/resources/ITFirstDomain.properties - customized properties for domain. Any property can be provided here from create-weblogic-domain-inputs.yaml. For all the properties that are not defined here, the default values in create-weblogic-domain-inputs.yaml are used while generating the domain inputs yaml file.
119
112
113
+
```
120
114
adminServerName= admin-server
121
115
domainName= base_domain
122
116
domainUID= domain1
@@ -133,6 +127,7 @@ exposeAdminNodePort= true
133
127
namespace= default
134
128
javaOptions= -Dweblogic.StdoutDebugEnabled=false
135
129
130
+
```
136
131
Certain properties like weblogicDomainStoragePath, weblogicOperatorImage, externalSans are populated at run time.
137
132
138
133
@@ -154,7 +149,6 @@ test methods - testAdminServerExternalService, testAdminT3Channel, testDomainLif
154
149
Utility classes:
155
150
156
151
Operator - contains methods to create/destroy operator, verify operator created, scale using rest api, etc
[ERROR] Tests run: 5, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1,271.204 s <<< FAILURE! - in oracle.kubernetes.operator.ITSingleDomain
253
247
[ERROR] testAdminT3Channel(oracle.kubernetes.operator.ITSingleDomain) Time elapsed: 145.59 s <<< ERROR!
254
248
java.lang.RuntimeException: FAILURE: testwebapp did not return 200 status code, got 404
@@ -294,7 +288,7 @@ java.lang.RuntimeException: FAILURE: testwebapp did not return 200 status code,
294
288
[ERROR] Please refer to /scratch/vmukkara/mychanges/weblogic-kubernetes-operator/integration-tests/target/failsafe-reports for the individual test results.
295
289
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream
296
290
297
-
291
+
```
298
292
Junit test results can be seen at "integration-tests/target/failsafe-reports/TEST-oracle.kubernetes.operator.ITSingleDomain.xml". This file shows how much time each test case took to run and the failed test results if any.
0 commit comments