Skip to content

Commit

Permalink
fix workflow security tests in alerting (#1310)
Browse files Browse the repository at this point in the history
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
  • Loading branch information
sbcd90 committed Nov 26, 2023
1 parent 06c1b8a commit 32718e8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
assertEquals("Get workflow failed", RestStatus.FORBIDDEN.status, e.response.statusLine.statusCode)
} finally {
deleteRoleAndRoleMapping(TEST_HR_ROLE)
deleteRoleMapping(ALERTING_FULL_ACCESS_ROLE)
deleteUser(getUser)
getUserClient?.close()
}
Expand Down Expand Up @@ -447,6 +448,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
} catch (e: ResponseException) {
assertEquals("Create workflow failed", RestStatus.FORBIDDEN.status, e.response.statusLine.statusCode)
} finally {
deleteRoleMapping(ALERTING_FULL_ACCESS_ROLE)
deleteUser(userWithDifferentRole)
userWithDifferentRoleClient?.close()
}
Expand Down Expand Up @@ -1104,6 +1106,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
assertEquals("Delete workflow failed", RestStatus.OK, response?.restStatus())
} finally {
deleteRoleAndRoleMapping(TEST_HR_ROLE)
deleteRoleMapping(ALERTING_FULL_ACCESS_ROLE)
deleteUser(deleteUser)
deleteUserClient?.close()
}
Expand Down

0 comments on commit 32718e8

Please sign in to comment.