From d5b6c03eee2ce5bd11001d83bdcc81778ff0b1d8 Mon Sep 17 00:00:00 2001 From: Tim Vernum Date: Wed, 6 Feb 2019 12:13:12 +1100 Subject: [PATCH] Fix exit code in certutil packaging test 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: #38393 --- .../java/org/elasticsearch/packaging/test/ArchiveTestCase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qa/vagrant/src/main/java/org/elasticsearch/packaging/test/ArchiveTestCase.java b/qa/vagrant/src/main/java/org/elasticsearch/packaging/test/ArchiveTestCase.java index 6b6c5e3eb831f..f304a1fe1f06b 100644 --- a/qa/vagrant/src/main/java/org/elasticsearch/packaging/test/ArchiveTestCase.java +++ b/qa/vagrant/src/main/java/org/elasticsearch/packaging/test/ArchiveTestCase.java @@ -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; @@ -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);