Add elasticsearch cli test for options plus illegal args
This commit is contained in:
parent
f91a046b6f
commit
0fe6c9f3b4
|
@ -80,17 +80,24 @@ public class ElasticsearchCliTests extends ESTestCase {
|
|||
runTest(
|
||||
ExitCodes.USAGE,
|
||||
false,
|
||||
output -> assertThat(output, containsString("Positional args not allowed, found [foo]")),
|
||||
output -> assertThat(output, containsString("Positional arguments not allowed, found [foo]")),
|
||||
(foreground, pidFile, esSettings) -> {},
|
||||
"foo"
|
||||
);
|
||||
runTest(
|
||||
ExitCodes.USAGE,
|
||||
false,
|
||||
output -> assertThat(output, containsString("Positional args not allowed, found [foo, bar]")),
|
||||
output -> assertThat(output, containsString("Positional arguments not allowed, found [foo, bar]")),
|
||||
(foreground, pidFile, esSettings) -> {},
|
||||
"foo", "bar"
|
||||
);
|
||||
runTest(
|
||||
ExitCodes.USAGE,
|
||||
false,
|
||||
output -> assertThat(output, containsString("Positional arguments not allowed, found [foo]")),
|
||||
(foreground, pidFile, esSettings) -> {},
|
||||
"-E", "something", "foo", "-E", "somethingelse"
|
||||
);
|
||||
}
|
||||
|
||||
public void testThatPidFileCanBeConfigured() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue