Skip to content

Commit d5b6c03

Browse files
committed
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: elastic#38393
1 parent 9f3b3b4 commit d5b6c03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qa/vagrant/src/main/java/org/elasticsearch/packaging/test/ArchiveTestCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import static org.elasticsearch.packaging.util.ServerUtils.makeRequest;
5555
import static org.hamcrest.CoreMatchers.containsString;
5656
import static org.hamcrest.CoreMatchers.is;
57+
import static org.hamcrest.CoreMatchers.not;
5758
import static org.hamcrest.CoreMatchers.notNullValue;
5859
import static org.hamcrest.MatcherAssert.assertThat;
5960
import static org.hamcrest.Matchers.isEmptyString;
@@ -317,7 +318,7 @@ public void test90SecurityCliPackaging() {
317318

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

0 commit comments

Comments
 (0)