Skip to content

Commit

Permalink
Add more test
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Binlong <[email protected]>
  • Loading branch information
gaobinlong committed Aug 14, 2023
1 parent 3de7e8f commit 4aaf9a8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ public void testReadProcessorFromObjectOrMap() throws Exception {
() -> ConfigurationUtils.readProcessor(registry, scriptService, "unknown_processor", invalidConfig)
);
assertThat(ex.getMessage(), equalTo("property isn't a map, but of type [" + invalidConfig.getClass().getName() + "]"));

ex = expectThrows(
OpenSearchParseException.class,
() -> ConfigurationUtils.readProcessor(registry, scriptService, "null_processor", null)
);
assertEquals(ex.getMessage(), "expect the config of processor [null_processor] to be map, but is null");
}

public void testNoScriptCompilation() {
Expand Down

0 comments on commit 4aaf9a8

Please sign in to comment.