]> source.dussan.org Git - sonarqube.git/commitdiff
NO-JIRA Fix unit test on windows
authorEric Giffon <eric.giffon@sonarsource.com>
Thu, 2 Mar 2023 09:30:30 +0000 (10:30 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 2 Mar 2023 20:03:50 +0000 (20:03 +0000)
server/sonar-main/src/test/java/org/sonar/application/es/EsKeyStoreCliTest.java

index ea0f2507bbceef5a5a4262a07af28e129cea154b..50cd28ebc327d3918631f5308e54571d76e53a8b 100644 (file)
@@ -63,12 +63,11 @@ public class EsKeyStoreCliTest {
 
     JavaCommand<?> executedCommand = process.getExecutedCommand();
 
-    String expectedHomeLibPath = Paths.get(homeDir.toString(), "lib", "*").toString();
-    String expectedHomeKeystorePath = Paths.get(homeDir.toString(), "lib", "cli-launcher", "*").toString();
+    String expectedHomeLibPath = Paths.get(homeDir.toString(), "lib") + File.separator + "*";
+    String expectedHomeKeystorePath = Paths.get(homeDir.toString(), "lib", "cli-launcher") + File.separator + "*";
 
     assertThat(executedCommand.getClassName()).isEqualTo("org.elasticsearch.launcher.CliToolLauncher");
-    assertThat(executedCommand.getClasspath())
-      .containsExactly(expectedHomeLibPath, expectedHomeKeystorePath);
+    assertThat(executedCommand.getClasspath()).containsExactly(expectedHomeLibPath, expectedHomeKeystorePath);
     assertThat(executedCommand.getParameters()).containsExactly("add", "-x", "-f", "test.property1", "test.property2", "test.property3");
     assertThat(executedCommand.getJvmOptions().getAll()).containsExactly(
       "-Xms4m",