X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/248c7167e95d970b770c43102ee68cf1319973f7..7ea5b1b2b78ceaa326d8f21ce1d08df0be1d9cda:/services/api/test/functional/arvados/v1/containers_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/containers_controller_test.rb b/services/api/test/functional/arvados/v1/containers_controller_test.rb index 588c025cf7..8c2919b971 100644 --- a/services/api/test/functional/arvados/v1/containers_controller_test.rb +++ b/services/api/test/functional/arvados/v1/containers_controller_test.rb @@ -97,7 +97,7 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase authorize_with :dispatch2 uuid = containers(:locked).uuid post :unlock, params: {id: uuid} - assert_response 422 + assert_response 403 end [ @@ -160,4 +160,12 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase assert_equal "v2/#{json_response['uuid']}/#{json_response['api_token']}", api_client_authorizations(:container_runtime_token).token assert_equal 'arvados#apiClientAuthorization', json_response['kind'] end + + test 'update_priority' do + ActiveRecord::Base.connection.execute "update containers set priority=0 where uuid='#{containers(:running).uuid}'" + authorize_with :admin + post :update_priority, params: {id: containers(:running).uuid} + assert_response :success + assert_not_equal 0, Container.find_by_uuid(containers(:running).uuid).priority + end end