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>
(cherry picked from commit 32718e8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 26, 2023
1 parent 21d13f2 commit 5632adb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,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 @@ -444,6 +445,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 @@ -1101,6 +1103,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 5632adb

Please sign in to comment.