Skip to content

Commit

Permalink
Merge pull request #13409 from AnuGayan/master-checkstyles
Browse files Browse the repository at this point in the history
Update Test framework with profiles
  • Loading branch information
tharikaGitHub committed Mar 7, 2024
2 parents 6c5a7e0 + f4bd2f5 commit 0b32091
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 11 deletions.
1 change: 1 addition & 0 deletions modules/distribution/product/src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<outputDirectory>wso2am-${pom.version}</outputDirectory>
<excludes>
<exclude>**/bin/wso2server.sh</exclude>
<exclude>**/bin/carbondump.sh</exclude>
<exclude>**/bin/wso2server.bat</exclude>
<exclude>**/conf/axis2/*.j2</exclude>
<exclude>**/conf/axis2/axis2.xml</exclude>
Expand Down
43 changes: 37 additions & 6 deletions modules/integration/tests-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,41 @@ under the License.
<artifactId>org.wso2.carbon.am.integration.test</artifactId>
<packaging>pom</packaging>

<modules>
<!--module>tests-benchmark</module-->
<module>tests-backend</module>
<!--module>tests-restart</module-->
<!--module>tests-config</module-->
</modules>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>tests-benchmark</module>
<module>tests-backend</module>
<module>tests-restart</module>
</modules>
</profile>
<profile>
<id>without-restart</id>
<modules>
<module>tests-backend</module>
</modules>
</profile>
<profile>
<id>benchmark-restart</id>
<modules>
<module>tests-benchmark</module>
<module>tests-restart</module>
</modules>
</profile>
<profile>
<id>benchmark-test</id>
<modules>
<module>tests-benchmark</module>
</modules>
</profile>
<profile>
<id>skip-test</id>
<modules>
</modules>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,10 @@ public void configureServer() throws AutomationFrameworkException {
WebAppDeploymentUtil.copyWebApp(relativeResourcePath + File.separator + "war" + File.separator
+ APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + ".war",
webappsPath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME);
WebAppDeploymentUtil.waitForWebappToDeploy(
webappsPath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + ".war", 120000L);

WebAppDeploymentUtil.copyWebApp(relativeResourcePath + File.separator + "war" + File.separator
+ APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME + ".war",
webappsPath + APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME);
WebAppDeploymentUtil.waitForWebappToDeploy(
webappsPath + APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME + ".war", 120000L);

log.info("Web Apps Deployed");
} catch (IOException e) {
Expand Down
5 changes: 5 additions & 0 deletions modules/integration/tests-integration/tests-restart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ under the License.
<artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-matchers</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public void setEnvironment(ITestContext ctx) throws Exception {
HttpResponse apiLoggingLoggingResponse = HTTPSClientUtils.doGet(getStoreURLHttps()
+ "api/am/devops/v0/tenant-logs/carbon.super/apis?log-level=full", apiLoggingHeader);
Assert.assertEquals(apiLoggingLoggingResponse.getData(), "{\"apis\":[{\"context\":\"/" + "apiloggingtest" + "/" + "1.0.0" + "\","
+ "\"logLevel\":\"FULL\",\"apiId\":\"" + apiLoggingApiId + "\"}]}");
+ "\"logLevel\":\"FULL\",\"apiId\":\"" + apiLoggingApiId + "\",\"resourceMethod\":null,\"resourcePath\":null}]}");

ctx.setAttribute("apiLoggingApplicationId", apiLoggingApplicationId);
/*
Expand Down

0 comments on commit 0b32091

Please sign in to comment.