X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b629d9e88ad0c6e62018a8fb4768013975eccc70..5cc1710b57f98905469225c68d975ad2e3e7e56d:/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 5b8ec0f638..8c2919b971 100644 --- a/services/api/test/functional/arvados/v1/containers_controller_test.rb +++ b/services/api/test/functional/arvados/v1/containers_controller_test.rb @@ -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