20319: Merge branch 'main' into 20319-container-request-logs
[arvados.git] / services / api / test / functional / arvados / v1 / containers_controller_test.rb
index 5b8ec0f6383c7dd4042e8197b7853786eae63afe..8c2919b97102db2e3007938e1fe32405c4251928 100644 (file)
@@ -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