Skip to content

Commit 35292e5

Browse files
committed
changes for review comments
1 parent 9eb81b6 commit 35292e5

File tree

3 files changed

+28
-31
lines changed

3 files changed

+28
-31
lines changed

integration-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ externalRestEnabled: true
9898
javaLoggingLevel: FINE
9999
```
100100

101-
src/integration-tests/resources/domainonpvwlst.yaml - See "Input Yaml to the test". For all the properties that are not defined here, the default values in the sample inputs are used while generating inputs yaml.
101+
src/integration-tests/resources/domainonpvwlst.yaml - See [Input Yaml to the test](#input-yaml-to-the-test). For all the properties that are not defined here, the default values in the sample inputs are used while generating inputs yaml.
102102

103103
```
104104
adminServerName: admin-server
@@ -126,7 +126,7 @@ The input yaml file(for example, domainonpvwlst.yaml) to the java test is used t
126126
- custom attributes that are used to provide more flexibility for creating the domain.
127127

128128
Below are the load balancer attributes:
129-
- loadBalancer: value can be TRAEFIK or VOYAGER, default is TRAEFIK
129+
- loadBalancer: value can be `TRAEFIK` or `VOYAGER`, default is `TRAEFIK`
130130
- loadBalancerWebPort: web port for the load balancer
131131
- ingressPerDomain: create ingress per domain or one ingress for all domains in multiple domain configuration, default is true.
132132

integration-tests/USECASES.MD

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
Java integration tests cover the below use cases:
44

5-
Quick test Configuration & Use Cases -
5+
## Quick test Configuration & Use Cases -
66

77
| | |
88
| --- | --- |
99
| Operator Configuration | operator1 deployed in `weblogic-operator1` namespace and manages domains in `default` and `test1` namespaces |
1010
| Domain Configuration | Domain on PV using WLST, Traefik load balancer |
1111

12-
Basic Use Cases
12+
**Basic Use Cases**
1313

1414
1. Create operator `operator1` which manages `default` and `test1` namespaces, verify it's deployed successfully, pods created, operator ready and verify external REST service, if configured.
1515
2. Create domain `domain1` in `default` namespace and verify the pods, services are created and servers are in ready state.
1616
3. Verify the admin external service by accessing the admin REST endpoint with `nodeport` in URL.
1717
4. Verify admin t3 channel port by exec into the admin pod and deploying webapp using the channel port for WLST.
1818
5. Verify web app load balancing by accessing the webapp using `loadBalancerWebPort`.
1919

20-
Advanced Use Cases
20+
**Advanced Use Cases**
2121

2222
6. Verify domain life cycle (destroy and create) should not have any impact on operator managing the domain and web app load balancing and admin external service.
2323
7. Cluster scale up/down using operator REST endpoint, webapp load balancing should adjust accordingly.
@@ -29,7 +29,7 @@ Also the below use cases are covered for Quick test:
2929
10. Shutdown the domain by changing domain `serverStartPolicy` to `NEVER`.
3030

3131

32-
Full test Configuration & Use Cases - Runs Quick test Configuration & Use cases and the below
32+
## Full test Configuration & Use Cases - Runs Quick test Configuration & Use cases and the below
3333

3434
| | |
3535
| --- | --- |
@@ -74,9 +74,7 @@ Basic Use Cases described above are verified in all the domain configurations. A
7474
| Server pods restarted by changing includeServerOutInPodLog | Verify admin and managed server pods being restarted by property change: includeServerOutInPodLog: true --> includeServerOutInPodLog: false |
7575
| Server pods restarted by changing logHomeEnable | Verify admin and managed server pods being restarted by property change: logHomeEnabled: true --> logHomeEnabled: false |
7676

77-
Configuration Overrides Usecases
78-
79-
| Override | Usecase |
77+
| Overrides | Usecase |
8078
| --- | --- |
8179
| Configuration override | Override the administration server properties `connect-timeout`, `max-message-size`, `restart-max`, `debug-server-life-cycle` and `debug-jmx-core` debug flags. Also T3Channel public address using Kubernetes secret. The override is verified by JMX client connecting to the serverConfig MBean tree and the values are checked against the expected values. The test client connects to the overridden T3 public address and port to connect to the MBean servers |
8280
| JDBC Resource Override | Override JDBC connection pool properties; `initialCapacity`, `maxCapacity`, `test-connections-on-reserve`, `connection-harvest-max-count`, `inactive-connection-timeout-seconds`. Override the JDBC driver parameters like data source `URL`, `DB` `user` and `password` using kubernetes secret. The test verifies the overridden functionality datasource `URL`, `user`, `password` by getting the data source connection and running DDL statement it is connected to. |

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

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,13 @@ private int getAdminSericeLBNodePort() throws Exception {
764764
}
765765

766766
/**
767-
* Create a map with attributes required to create PV and create PV dir by calling
767+
* Create a map with attributes required to create PV/PVC and create PV dir by calling
768768
* PersistentVolume
769769
*
770-
* @throws Exception
770+
* @throws Exception If the file create-pv-pvc-inputs.yaml does not exist, is a directory rather
771+
* than a regular file, or for some other reason cannot be opened for reading. or if an I/O
772+
* error occurs or any errors while creating PV dir or generating PV/PVC input file or any
773+
* errors while executing sample create-pv-pvc.sh script
771774
*/
772775
private void createPV() throws Exception {
773776

@@ -912,9 +915,10 @@ public void verifyManagedServersRestarted() throws Exception {
912915
}
913916

914917
/**
915-
* create secret
918+
* create a Kubernetes secret and labels the secret with domainUid. This secret is used for
919+
* weblogicCredentialsSecretName in the domain inputs
916920
*
917-
* @throws Exception
921+
* @throws Exception when the kubectl create secret command fails or label secret fails
918922
*/
919923
private void createSecret() throws Exception {
920924
Secret secret =
@@ -932,9 +936,10 @@ private void createSecret() throws Exception {
932936
}
933937

934938
/**
935-
* Generate domain values yaml using the doamin map
939+
* Creates a directory using domainUid under userProjects weblogic-domains location. Creates
940+
* weblogic-domain-values.yaml files using the domain map inputs at this new location.
936941
*
937-
* @throws Exception
942+
* @throws Exception if the dir/file can not be created
938943
*/
939944
private void generateInputYaml() throws Exception {
940945
Path parentDir =
@@ -944,11 +949,14 @@ private void generateInputYaml() throws Exception {
944949
}
945950

946951
/**
947-
* copy create-domain.py if domain Map contains, git clone docker-images for domain in image and
948-
* call create-domain.sh script based on the domain type. Append configOverrides to domain.yaml.
952+
* copy create-domain.py if domain Map contains createDomainPyScript, git clone docker-images for
953+
* domain in image and call create-domain.sh script based on the domain type. Append
954+
* configOverrides to domain.yaml.
949955
*
950-
* @param outputDir
951-
* @throws Exception
956+
* @param outputDir directory for the generated Kubernetes YAML files for the domain when
957+
* create-domain.sh is called
958+
* @throws Exception if git clone fails or if createDomainPyScript can not be copied or if the
959+
* cluster topology file can not be copied or if create-domain.sh fails
952960
*/
953961
private void callCreateDomainScript(String outputDir) throws Exception {
954962

@@ -1171,8 +1179,9 @@ private void callWebAppAndCheckForServerNameInResponse(
11711179
* Reads the create-domain-inputs.yaml from samples and overrides with attribute in input domain
11721180
* map. Initializes the variables for the attributes in the map to be used later.
11731181
*
1174-
* @param inputDomainMap
1175-
* @throws Exception
1182+
* @param inputDomainMap domain, LB, PV and custom input attributes for the domain
1183+
* @throws Exception if removing the results dir fails or if create-domain-inputs.yaml cannot be
1184+
* accessed to read or if creating config map or secret fails for configoverrides
11761185
*/
11771186
private void initialize(Map<String, Object> inputDomainMap) throws Exception {
11781187
domainMap = inputDomainMap;
@@ -1253,16 +1262,6 @@ private void initialize(Map<String, Object> inputDomainMap) throws Exception {
12531262
}
12541263
if (System.getenv("IMAGE_PULL_SECRET_WEBLOGIC") != null) {
12551264
domainMap.put("imagePullSecretName", System.getenv("IMAGE_PULL_SECRET_WEBLOGIC"));
1256-
if (System.getenv("WERCKER") != null) {
1257-
// create docker registry secrets
1258-
TestUtils.createDockerRegistrySecret(
1259-
System.getenv("IMAGE_PULL_SECRET_WEBLOGIC"),
1260-
System.getenv("REPO_SERVER"),
1261-
System.getenv("REPO_USERNAME"),
1262-
System.getenv("REPO_PASSWORD"),
1263-
System.getenv("REPO_EMAIL"),
1264-
domainNS);
1265-
}
12661265
} else {
12671266
domainMap.put("imagePullSecretName", "docker-store");
12681267
}

0 commit comments

Comments
 (0)