Skip to content

Commit

Permalink
use shell with JAVA_HOME for starting archive (elastic#40118)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyb-elastic authored Mar 16, 2019
1 parent df11ba8 commit 2722d3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,12 @@ public void test93ElasticsearchNodeCustomDataPathAndNotEsHomeWorkDir() throws IO
Path relativeDataPath = installation.data.relativize(installation.home);
append(installation.config("elasticsearch.yml"), "path.data: " + relativeDataPath);

Archives.runElasticsearch(installation);
Archives.stopElasticsearch(installation);

final Shell sh = new Shell();
final Shell sh = newShell();
sh.setWorkingDirectory(getTempDir());

Archives.runElasticsearch(installation, sh);
Archives.stopElasticsearch(installation);

Result result = sh.run("echo y | " + installation.executables().elasticsearchNode + " unsafe-bootstrap");
assertThat(result.stdout, containsString("Master node was successfully bootstrapped"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ private static void verifyDefaultInstallation(Installation es, Distribution dist
).forEach(configFile -> assertThat(es.config(configFile), file(File, owner, owner, p660)));
}

public static void runElasticsearch(Installation installation) throws IOException {
runElasticsearch(installation, new Shell());
}

public static void runElasticsearch(Installation installation, Shell sh) throws IOException {
final Path pidFile = installation.home.resolve("elasticsearch.pid");

Expand Down

0 comments on commit 2722d3f

Please sign in to comment.