Skip to content

Commit

Permalink
accept past tense error message in getModel IT
Browse files Browse the repository at this point in the history
Signed-off-by: HenryL27 <[email protected]>
  • Loading branch information
HenryL27 committed Nov 29, 2023
1 parent 87707ff commit 9e0b80e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public class RestMLGetModelActionIT extends MLCommonsRestTestCase {
public ExpectedException exceptionRule = ExpectedException.none();

public void testGetModelAPI_EmptyResources() throws IOException {
exceptionRule.expect(ResponseException.class);
exceptionRule.expectMessage("Fail to find model");
TestHelper.makeRequest(client(), "GET", "/_plugins/_ml/models/111222333", null, "", null);
ResponseException e = assertThrows(
ResponseException.class,
() -> TestHelper.makeRequest(client(), "GET", "/_plugins/_ml/models/111222333", null, "", null)
);
String msg = e.getMessage();
assert (msg.contains("Fail to find model") || msg.contains("Failed to find model"));
}

@Ignore
Expand Down

0 comments on commit 9e0b80e

Please sign in to comment.