Fix exit code in certutil packaging test (#38393)
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)
This commit is contained in:
parent
57600c5acb
commit
517aa95984
|
@ -50,6 +50,7 @@ import static org.elasticsearch.packaging.util.FileUtils.rm;
|
||||||
import static org.elasticsearch.packaging.util.ServerUtils.makeRequest;
|
import static org.elasticsearch.packaging.util.ServerUtils.makeRequest;
|
||||||
import static org.hamcrest.CoreMatchers.containsString;
|
import static org.hamcrest.CoreMatchers.containsString;
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
|
import static org.hamcrest.CoreMatchers.not;
|
||||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||||
import static org.hamcrest.Matchers.isEmptyString;
|
import static org.hamcrest.Matchers.isEmptyString;
|
||||||
import static org.junit.Assume.assumeThat;
|
import static org.junit.Assume.assumeThat;
|
||||||
|
@ -293,7 +294,7 @@ public abstract class ArchiveTestCase extends PackagingTestCase {
|
||||||
|
|
||||||
// Ensure that the exit code from the java command is passed back up through the shell script
|
// Ensure that the exit code from the java command is passed back up through the shell script
|
||||||
result = sh.runIgnoreExitCode(bin.elasticsearchCertutil + " invalid-command");
|
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]"));
|
assertThat(result.stdout, containsString("Unknown command [invalid-command]"));
|
||||||
};
|
};
|
||||||
Platforms.onLinux(action);
|
Platforms.onLinux(action);
|
||||||
|
|
Loading…
Reference in New Issue