Skip to content

Commit 31be27e

Browse files
authored
Fix exit code in certutil packaging test (#38479)
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
1 parent 0bb4aa2 commit 31be27e

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)