Skip to content

Commit

Permalink
fix exception type
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <[email protected]>
  • Loading branch information
lezzago committed Mar 8, 2022
1 parent db3c8a6 commit 0868314
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class SecureMonitorRestApiIT : AlertingRestTestCase() {
NStringEntity(search, ContentType.APPLICATION_JSON)
)
fail("Expected 403 FORBIDDEN response")
} catch (e: AssertionError) {
} catch (e: ResponseException) {
assertEquals("Unexpected status", RestStatus.FORBIDDEN, e.response.restStatus())
}

Expand Down Expand Up @@ -485,7 +485,7 @@ class SecureMonitorRestApiIT : AlertingRestTestCase() {
NStringEntity(search, ContentType.APPLICATION_JSON)
)
fail("Expected 403 FORBIDDEN response")
} catch (e: AssertionError) {
} catch (e: ResponseException) {
assertEquals("Unexpected status", RestStatus.FORBIDDEN, e.response.restStatus())
}

Expand Down Expand Up @@ -631,7 +631,7 @@ class SecureMonitorRestApiIT : AlertingRestTestCase() {
try {
getAlerts(userClient as RestClient, inputMap).asMap()
fail("Expected 403 FORBIDDEN response")
} catch (e: AssertionError) {
} catch (e: ResponseException) {
assertEquals("Unexpected status", RestStatus.FORBIDDEN, e.response.restStatus())
}

Expand Down Expand Up @@ -668,7 +668,7 @@ class SecureMonitorRestApiIT : AlertingRestTestCase() {
try {
getAlerts(userClient as RestClient, inputMap).asMap()
fail("Expected 403 FORBIDDEN response")
} catch (e: AssertionError) {
} catch (e: ResponseException) {
assertEquals("Unexpected status", RestStatus.FORBIDDEN, e.response.restStatus())
}

Expand Down

0 comments on commit 0868314

Please sign in to comment.