X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/14a6eb786a0d01e86ccae7645e880661caf6f0cb..b5dfc8fb22ef85e09e7034b7899f54dfe5adb6cd:/services/api/test/functional/arvados/v1/container_requests_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/container_requests_controller_test.rb b/services/api/test/functional/arvados/v1/container_requests_controller_test.rb index 95c477f411..e99af39c9c 100644 --- a/services/api/test/functional/arvados/v1/container_requests_controller_test.rb +++ b/services/api/test/functional/arvados/v1/container_requests_controller_test.rb @@ -24,7 +24,8 @@ class Arvados::V1::ContainerRequestsControllerTest < ActionController::TestCase cr = JSON.parse(@response.body) assert_not_nil cr, 'Expected container request' - assert_equal sp, cr['scheduling_parameters'] + assert_equal sp['partitions'], cr['scheduling_parameters']['partitions'] + assert_equal false, cr['scheduling_parameters']['preemptible'] end test "secret_mounts not in #create responses" do @@ -62,6 +63,28 @@ class Arvados::V1::ContainerRequestsControllerTest < ActionController::TestCase assert_equal 'bar', req.secret_mounts['/foo']['content'] end + test "cancel with runtime_constraints and scheduling_params with default values" do + authorize_with :active + req = container_requests(:queued) + + patch :update, params: { + id: req.uuid, + container_request: { + state: 'Final', + priority: 0, + runtime_constraints: { + 'vcpus' => 1, + 'ram' => 123, + 'keep_cache_ram' => 0, + }, + scheduling_parameters: { + "preemptible"=>false + } + }, + } + assert_response :success + end + test "update without deleting secret_mounts" do authorize_with :active req = container_requests(:uncommitted)