Skip to content

Commit

Permalink
Fix dependency fetch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suganyasuven committed Feb 11, 2021
1 parent 09a0d8c commit 48a96b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,15 @@ public static void testInstallation(Executor executor, String version, String sp
* Execute smoke testing to verify fetching dependencies.
*
* @param executor Executor for relevant operating system
* @param version Installed Ballerina version
* @param specVersion Installed language specification
* @param toolVersion Installed tool version
*/
public static void testDependencyFetch(Executor executor, String version, String specVersion, String toolVersion) {
//Test installation
TestUtils.testInstallation(executor, version, specVersion, toolVersion);
public static void testDependencyFetch(Executor executor, String toolVersion) {
executor.executeCommand("dist list", false, toolVersion);
//Test `Fetching compatible JRE dependency`
String output = executor.executeCommand("dist pull slp1", true, toolVersion);
Assert.assertTrue(output.contains("Downloading slp1"));
Assert.assertTrue(output.contains("Fetching the dependencies for 'slp1' from the remote server..."));
Assert.assertTrue(output.contains("Downloading jdk8u202-b08-jre"));
Assert.assertTrue(output.contains("jdk8u202-b08-jre"));
Assert.assertTrue(output.contains("'slp1' successfully set as the active distribution"));
TestUtils.testInstallation(executor, "swan-lake-preview1", "v2020-06-18", toolVersion);
String cmdName = Utils.getCommandName(toolVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void testFetchDependency(Executor executor) {
executor.install();

TestUtils.testInstallation(executor, version, specVersion, toolVersion);
TestUtils.testDependencyFetch(executor, version, specVersion, toolVersion);
TestUtils.testDependencyFetch(executor, toolVersion);

executor.uninstall();
executor.cleanArtifacts();
Expand Down

0 comments on commit 48a96b6

Please sign in to comment.