Skip to content

Commit

Permalink
Force dumping stack trace in CLI integration tests
Browse files Browse the repository at this point in the history
Integrate feedback from @david-waltermire in previous pairing session.
  • Loading branch information
aj-stein-nist committed Jan 23, 2024
1 parent da2fa74 commit b951def
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ private static Stream<Arguments> providesValues() {
List<Arguments> values = new ArrayList<>();
values.add(Arguments.of(new String[] {}, ExitCode.INVALID_COMMAND, noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "-h" }, ExitCode.OK, noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "generate-schema", "--help" }, ExitCode.INVALID_COMMAND,
noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "validate", "--help" }, ExitCode.OK, noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "validate-content", "--help" }, ExitCode.INVALID_COMMAND,
values
.add(Arguments.of(new String[] { "generate-schema", "--help", "--show-stack-trace" }, ExitCode.INVALID_COMMAND,
noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "validate", "--help", "--show-stack-trace" }, ExitCode.OK,
noExpectedExceptionClass));
values
.add(Arguments.of(new String[] { "validate-content", "--help", "--show-stack-trace" }, ExitCode.INVALID_COMMAND,
noExpectedExceptionClass));
values.add(Arguments.of(
new String[] { "validate",
"../databind/src/test/resources/metaschema/fields_with_flags/metaschema.xml" },
"../databind/src/test/resources/metaschema/fields_with_flags/metaschema.xml", "--show-stack-trace" },
ExitCode.OK, noExpectedExceptionClass));
values.add(Arguments.of(new String[] { "generate-schema", "--overwrite", "--as", "JSON",
"../databind/src/test/resources/metaschema/fields_with_flags/metaschema.xml",
Expand Down Expand Up @@ -113,7 +116,8 @@ void testQueryCommand() {
String[] args
= new String[] { "query", "-m", "../databind/src/test/resources/metaschema/fields_with_flags/metaschema.xml",
"-i",
"../databind/src/test/resources/metaschema/fields_with_flags/example.json", "3 + 4 + 5" };
"../databind/src/test/resources/metaschema/fields_with_flags/example.json", "3 + 4 + 5",
"--show-stack-trace" };
CLI.runCli(args);
assertThat(logCaptor.getInfoLogs()).containsExactly("[12]");
};
Expand Down

0 comments on commit b951def

Please sign in to comment.