Skip to content

Commit 000dc2f

Browse files
committed
OWLS-75022 -modify tests to use WLST to deploy app
1 parent dd6e24e commit 000dc2f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -735,17 +735,21 @@ private static void deployMonitoringExporterPrometethusGrafana(
735735
crdCmd = " kubectl apply -f " + samplesDir + "grafana-deployment.yaml";
736736
result = ExecCommand.exec(crdCmd);
737737
logger.info("command result " + result.stdout().trim());
738-
domain.deployWebAppViaREST(
739-
"wlsexporter", exporterAppPath, BaseTest.getUsername(), BaseTest.getPassword());
738+
Map<String, Object> domainMap = domain.getDomainMap();
739+
// create the app directory in admin pod
740+
TestUtils.kubectlexec(
741+
domain.getDomainUid() + ("-") + domainMap.get("adminServerName"),
742+
"" + domainMap.get("namespace"),
743+
" -- mkdir -p " + appLocationInPod);
744+
domain.deployWebAppViaWLST(
745+
"wls-exporter", exporterAppPath, appLocationInPod, getUsername(), getPassword(), true);
740746
}
741747

742748
private static void redeployMonitoringExporter(Domain domain) throws Exception {
743749
String exporterAppPath = monitoringExporterDir + "/apps/monitoringexporter/wls-exporter.war";
744750

745-
domain.undeployWebAppViaREST(
746-
"wlsexporter", exporterAppPath, BaseTest.getUsername(), BaseTest.getPassword());
747-
domain.deployWebAppViaREST(
748-
"wlsexporter", exporterAppPath, BaseTest.getUsername(), BaseTest.getPassword());
751+
domain.deployWebAppViaWLST(
752+
"wls-exporter", exporterAppPath, appLocationInPod, getUsername(), getPassword(), true);
749753
// check if exporter is up
750754
domain.callWebAppAndVerifyLoadBalancing("wls-exporter", false);
751755
}

0 commit comments

Comments
 (0)