Skip to content

Commit

Permalink
Merge pull request #3093 from dulanjalidilmi/master-git-actions
Browse files Browse the repository at this point in the history
Fix git actions
  • Loading branch information
dulanjalidilmi authored Feb 1, 2024
2 parents 7fd05f7 + bdfa5b2 commit 1de7673
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jdk-17-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 17
distribution: 'temurin'
java-version: '17.0.6'
- name: check mvn version
run: echo "MAVEN_VERSION=$(mvn -v)"
- name: check java version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void testUpdateLogger() throws IOException, InterruptedException, Automat
Assert.assertTrue(carbonLogReader.checkForLog("{\"performedBy\":\"admin\",\"action\":\"updated\",\"type\":\"log_level\",\"info\":\"{\\\"loggerName\\\":\\\"com-atomikos\\\",\\\"loggingLevel\\\":\\\"DEBUG\\\"}\"}", 120));
}

@Test(groups = {"wso2.esb" }, priority = 3,
@Test(groups = {"wso2.esb" }, priority = 4,
description = "Test upload CAPP")
public void testCAppUpload() throws IOException, InterruptedException, AutomationFrameworkException {
if (!isManagementApiAvailable) {
Expand All @@ -258,7 +258,7 @@ public void testCAppUpload() throws IOException, InterruptedException, Automatio
Assert.assertTrue(carbonLogReader.checkForLog("{\"performedBy\":\"admin\",\"action\":\"created\",\"type\":\"carbon_application\",\"info\":\"{\\\"cAppFileName\\\":\\\"esb-artifacts-car_1.0.0.car\\\"}\"}", 120));
}

@Test(groups = {"wso2.esb" }, priority = 3, dependsOnMethods = "testCAppUpload",
@Test(groups = {"wso2.esb" }, priority = 4, dependsOnMethods = "testCAppUpload",
description = "Test remove CAPP")
public void testCAppRemove() throws IOException, InterruptedException, AutomationFrameworkException {
if (!isManagementApiAvailable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,12 +658,23 @@ public void testRegistryGetDirectoryExpandToVerifyChanges() throws IOException {
JSONArray filesArray = jsonResponse.getJSONArray("files");
Assert.assertEquals(filesArray.length(), 4, "Assert Failed due to the mismatch of " +
"actual vs expected resource count");
boolean isTestJson = false;
boolean isTestText = false;

for (int i = 0; i < filesArray.length(); i++) {
log.info("printing fileArray element " + i + ": " + filesArray.getJSONObject(i).get("name").toString());
if(filesArray.getJSONObject(i).get("name").toString().contains("test-json.json")) {
isTestJson = true;
}

if(filesArray.getJSONObject(i).get("name").toString().contains("test-text.txt")) {
isTestText = true;
}
}
log.info("filesArray.getJSONObject(0).get(\"name\")::: " + filesArray.getJSONObject(0).get("name"));
Assert.assertTrue(filesArray.getJSONObject(0).get("name").toString().contains("test-json.json"));
Assert.assertTrue(filesArray.getJSONObject(1).get("name").toString().contains("test-text.txt"));
Assert.assertTrue(isTestJson,
"Assert Failed due to the mismatch of actual vs expected test-json file presence");
Assert.assertTrue(isTestText,
"Assert Failed due to the mismatch of actual vs expected test-text file presence");
}

@Test(groups = { "wso2.esb" }, description = "Test error - deleting non existing registry")
Expand Down

0 comments on commit 1de7673

Please sign in to comment.