From: Lucas Di Pentima Date: Wed, 13 Jul 2022 20:21:28 +0000 (-0300) Subject: 19206: Adds test exposing the bug. X-Git-Tag: 2.5.0~120^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/41a378b99c8c4411a66c19e878b7535c67de2ba3 19206: Adds test exposing the bug. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/services/api/test/integration/users_test.rb b/services/api/test/integration/users_test.rb index f3e787e3df..3660d35bad 100644 --- a/services/api/test/integration/users_test.rb +++ b/services/api/test/integration/users_test.rb @@ -480,4 +480,17 @@ class UsersTest < ActionDispatch::IntegrationTest assert_response 403 end + test "disabling system root user not permitted" do + put("/arvados/v1/users/#{users(:system_user).uuid}", + params: { + user: {is_admin: false} + }, + headers: auth(:admin)) + assert_response 422 + + post("/arvados/v1/users/#{users(:system_user).uuid}/unsetup", + params: {}, + headers: auth(:admin)) + assert_response 422 + end end