Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
fix: Shell command fixed for CentOS (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed May 21, 2020
1 parent 172b4ab commit cfe48a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public LogAnalyzer getLogsAnalyzer() {

@NotNull
private String getShellExecutable() throws IOException, InterruptedException {
if(this.execInContainer("which", "bash").getExitCode() == 0) {
if(this.execInContainer("bash", "--help").getExitCode() == 0) {
return "bash";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void after() {

@Test
public void executeCommandUsingBashWhenRunningInBashBasedContainer() throws IOException, InterruptedException {
_container = new GenericContainerEx<>("ubuntu:xenial").withCommand("bash", "-c", "sleep 100s");
_container = new GenericContainerEx<>("centos").withCommand("bash", "-c", "sleep 100s");
_container.start();
_container.followOutput(new Slf4jLogConsumer(logger));

Expand Down

0 comments on commit cfe48a4

Please sign in to comment.