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(
|
runTest(
|
||||||
ExitCodes.USAGE,
|
ExitCodes.USAGE,
|
||||||
false,
|
false,
|
||||||
output -> assertThat(output, containsString("Positional args not allowed, found [foo]")),
|
output -> assertThat(output, containsString("Positional arguments not allowed, found [foo]")),
|
||||||
(foreground, pidFile, esSettings) -> {},
|
(foreground, pidFile, esSettings) -> {},
|
||||||
"foo"
|
"foo"
|
||||||
);
|
);
|
||||||
runTest(
|
runTest(
|
||||||
ExitCodes.USAGE,
|
ExitCodes.USAGE,
|
||||||
false,
|
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) -> {},
|
(foreground, pidFile, esSettings) -> {},
|
||||||
"foo", "bar"
|
"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 {
|
public void testThatPidFileCanBeConfigured() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue