Skip to content

Commit

Permalink
Fix exit code in certutil packaging test
Browse files Browse the repository at this point in the history
The exit code is different on windows, and we don't really care about
which code it is, we just need to check that it's not 0 (success)

Backport of: elastic#38393
  • Loading branch information
tvernum committed Feb 6, 2019
1 parent 9f3b3b4 commit d5b6c03
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import static org.elasticsearch.packaging.util.ServerUtils.makeRequest;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.isEmptyString;
Expand Down Expand Up @@ -317,7 +318,7 @@ public void test90SecurityCliPackaging() {

// Ensure that the exit code from the java command is passed back up through the shell script
result = sh.runIgnoreExitCode(bin.elasticsearchCertutil + " invalid-command");
assertThat(result.exitCode, is(64));
assertThat(result.exitCode, is(not(0)));
assertThat(result.stdout, containsString("Unknown command [invalid-command]"));
};
Platforms.onLinux(action);
Expand Down

0 comments on commit d5b6c03

Please sign in to comment.