Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
suganyasuven committed Feb 5, 2021
1 parent e6ff2be commit 4cde2ad
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
public class BallerinaCommandTest {
private static final String DIST_NAME = "ballerina-" + TestUtils.MAVEN_VERSION;
public static final String VERSION = System.getProperty("maven.version");
public static final String SHORT_VERSION = System.getProperty("short.version");
private static final String SPEC_VERSION = System.getProperty("spec.version");
public static final String VERSION_DISPLAY_TEXT = System.getProperty("version.display.text");
private static final String TOOL_VERSION = System.getProperty("tool.version");
Expand Down Expand Up @@ -88,14 +89,15 @@ public void testDistCommands() throws IOException {
// test bal dist remove <version>
actualOutput = TestUtils.executeCommand(path + " dist remove slp7");
Assert.assertTrue(actualOutput.contains("The active Ballerina distribution cannot be removed"));
actualOutput = TestUtils.executeCommand(path + " dist remove 1.2.3");
Assert.assertTrue(actualOutput.contains("Distribution '1.2.3' successfully removed"));
// test bal update
actualOutput = TestUtils.executeCommand(path + " update");
Assert.assertTrue(actualOutput.contains("Fetching the latest tool version from the remote server..."));
actualOutput = TestUtils.executeCommand(path + " dist remove " + SHORT_VERSION);
Assert.assertTrue(actualOutput.contains("Distribution '" + SHORT_VERSION + "' successfully removed"));
actualOutput = TestUtils.executeCommand(path + " dist use " + SHORT_VERSION);
Assert.assertTrue(actualOutput.contains("Distribution '" + SHORT_VERSION + "' not found"));
// test bal dist remove -a
actualOutput = TestUtils.executeCommand(path + " dist remove -a");
Assert.assertTrue(actualOutput.contains("All non-active distributions are successfully removed"));
actualOutput = TestUtils.executeCommand(path + " dist use 1.2.3");
Assert.assertTrue(actualOutput.contains("Distribution '1.2.3' not found"));
}

@AfterClass
Expand Down

0 comments on commit 4cde2ad

Please sign in to comment.