Skip to content

Commit b1dd2b5

Browse files
authored
Merge pull request #1068 from oracle/exportertest
OWLS-73314, added tests for monitoring exporter
2 parents af4835d + 0a3df4a commit b1dd2b5

18 files changed

+1154
-3
lines changed

integration-tests/USECASES.MD

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
| --- | --- |
@@ -103,8 +103,21 @@ Configuration Overrides Usecases
103103
| Server affinity | Use a web application deployed on Weblogic cluster to track HTTP session. Test server-affinity by sending two HTTP requests to Weblogic and verify that all requests are directed to same Weblogic server |
104104
| Session state isolation | Verify that values saved in a client session state are not visible to another client |
105105

106+
| Monitoring Exporter | Use Case |
107+
| --- | --- |
108+
| Check Metrics via Prometheus | build, deploy webapp for Monitoring Exporter, start Prometheus and verify the metrics was produced by using Prometheus APIs |
109+
| Replace Configuration via exporter console| Verify that configuration for monitoring exporter can be replaced during runtime, check applied metrics via Prometheus APIs|
110+
| Append Configuration via exporter console| Verify that configuration for monitoring exporter can be appended during runtime, check applied metrics via Prometheus APIs|
111+
| Append Configuration with varios combinations of attributes via exporter console| Append monitoring exporter configuration [a] to new config [a,b] and verify it was applied |
112+
| Replace Configuration with only one attribute as array via exporter console| Replace monitoring exporter configuration [a,b,c] attributes with new config [a] and verify it was applied |
113+
| Replace Configuration with empty config file via exporter console| Replace monitoring exporter configuration with empty config file, verify it was applied |
114+
| Replace/Append Configuration with config file written in non yml format via exporter console| Try to replace/append monitoring exporter configuration with config file written in non yml format, verify configuration has not changed |
115+
| Replace/Append Configuration with corrupted yml file via exporter console| Try to replace/append monitoring exporter configuration with config file written in corrupted yml format, verify configuration has not changed |
116+
| Replace/Append Configuration with dublicated values in the config file via exporter console| Try to replace/append monitoring exporter configuration with dublicated values in the config file, verify configuration has not changed |
117+
| Replace/Append Configuration with invalid credentials via exporter console| Try to replace/append monitoring exporter configuration with varios combos for invalid credentials, verify configuration has not changed and `401 Unauthorized` exception was thrown |
118+
106119
| Logging with Elastic Stack | Use Case |
107120
| --- | --- |
108121
| Search log level | Use Elasticsearch Count API to query logs of level=INFO and verify that total number of logs for level=INFO is not zero and failed count is zero |
109122
| Search Operator log | Use Elasticsearch Search APIs to query Operator log info and verify that log hits for type=weblogic-operator are not empty |
110-
| Search Weblogic log | Use Elasticsearch Search APIs to query Weblogic log info and verify that log hits for Weblogic servers are not empty |
123+
| Search Weblogic log | Use Elasticsearch Search APIs to query Weblogic log info and verify that log hits for Weblogic servers are not empty |

integration-tests/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
<artifactId>jaxb-api</artifactId>
114114
<version>2.3.1</version>
115115
</dependency>
116+
<dependency>
117+
<groupId>net.sourceforge.htmlunit</groupId>
118+
<artifactId>htmlunit</artifactId>
119+
<version>2.32</version>
120+
</dependency>
116121
</dependencies>
117122

118123
<build>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ private void copyScalingScriptToPod(
628628
domainNS);
629629
}
630630

631-
private void buildDeployWebServiceApp(Domain domain, String testAppName, String wsName)
631+
public static void buildDeployWebServiceApp(Domain domain, String testAppName, String wsName)
632632
throws Exception {
633633
String scriptName = "buildDeployWSAndWSClientAppInPod.sh";
634634
// Build WS and WS client WARs in the admin pod and deploy it from the admin pod to a weblogic

0 commit comments

Comments
 (0)