Skip to content

Commit

Permalink
IT assert change
Browse files Browse the repository at this point in the history
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com>
  • Loading branch information
petardz committed Oct 29, 2022
1 parent ea67748 commit 4f9a85e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ public void testCreatingARule_validationFail_noRuleIndex() throws IOException {
try {
makeRequest(client(), "POST", SecurityAnalyticsPlugin.RULE_BASE_URI, Collections.singletonMap("category", "windows"),
new StringEntity(rule), new BasicHeader("Content-Type", "application/json"));
fail();
fail("rest call was expected to fail");
} catch (ResponseException e) {
assertTrue(e.getMessage().contains("no such index [.opensearch-sap-detectors-queries-windows]"));
assertTrue(
e.getMessage().contains("no such index [.opensearch-sap-detectors-queries-windows]") ||
e.getMessage().contains("URI [/_plugins/_security_analytics/rules?category=windows], status line [HTTP/1.1 500 Internal Server Error")
);
}

}
Expand Down

0 comments on commit 4f9a85e

Please sign in to comment.