Skip to content

Commit

Permalink
Fix Windows test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhashinee committed Feb 28, 2024
1 parent 1bf5b9f commit c8db5d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public void testBuildWithMysql() throws IOException, InterruptedException {

@Test(enabled = true)
public void testBuildWithInvalidTargetModule() throws IOException, InterruptedException {
String log = "ERROR: invalid module name : 'persist_add_1' :\n" +
String log = "ERROR: invalid module name : 'persist_add_1' :" + System.lineSeparator() +
"module name should follow the template <package_name>.<module_name>";
Path project = TARGET_DIR.resolve("generated-sources/tool_test_build_2");
assertLogs(log, project);
}

@Test(enabled = true)
public void testBuildWithInvalidCharachtersInTargetModule() throws IOException, InterruptedException {
String log = "ERROR: invalid module name : '*****' :\n" +
String log = "ERROR: invalid module name : '*****' :" + System.lineSeparator() +
"module name can only contain alphanumerics, underscores and periods";
Path project = TARGET_DIR.resolve("generated-sources/tool_test_build_3");
assertLogs(log, project);
Expand All @@ -69,7 +69,7 @@ public void testBuildWithInvalidLengthOfTargetModule() throws IOException, Inter
String log = "ERROR: invalid module name : 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
"aaaaaaaaaaaaaaaaaaaaaaaaddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" +
"ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" +
"dddddddddddddddddddddd' :\n" +
"dddddddddddddddddddddd' :" + System.lineSeparator() +
"maximum length of module name is 256 characters";
Path project = TARGET_DIR.resolve("generated-sources/tool_test_build_4");
assertLogs(log, project);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public static Module getEntities(Path schemaFile) throws BalException {
}

public static void updateToml(String sourcePath, String datastore, String module) throws BalException, IOException {
String sourceContent = "[[tool.persist]]\n" +
"options.datastore = \"" + datastore + "\"\n" +
String sourceContent = "[[tool.persist]]" + System.lineSeparator() +
"options.datastore = \"" + datastore + "\"" + System.lineSeparator() +
"module = \"" + module + "\"";
Path generatedCmdOutPath = Paths.get(sourcePath, TARGET_DIRECTORY, GENERATE_CMD_FILE);
Utils.writeToTargetFile(sourceContent, generatedCmdOutPath.toAbsolutePath().toString());
Expand Down

0 comments on commit c8db5d1

Please sign in to comment.