X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c75359c0116392ea13ebf578c74e495c9e158f62..5e3f6c9ad492c43044c88ebdc7eea6bdff667f46:/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 8c2919b971..07fa5c3211 100644 --- a/services/api/test/functional/arvados/v1/containers_controller_test.rb +++ b/services/api/test/functional/arvados/v1/containers_controller_test.rb @@ -168,4 +168,25 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase assert_response :success assert_not_equal 0, Container.find_by_uuid(containers(:running).uuid).priority end + + test 'update runtime_status, runtime_status is toplevel key' do + authorize_with :dispatch1 + c = containers(:running) + patch :update, params: {id: containers(:running).uuid, runtime_status: {activity: "foo", activityDetail: "bar"}} + assert_response :success + end + + test 'update runtime_status, container is toplevel key' do + authorize_with :dispatch1 + c = containers(:running) + patch :update, params: {id: containers(:running).uuid, container: {runtime_status: {activity: "foo", activityDetail: "bar"}}} + assert_response :success + end + + test 'update state, state is toplevel key' do + authorize_with :dispatch1 + c = containers(:running) + patch :update, params: {id: containers(:running).uuid, state: "Complete", runtime_status: {activity: "finishing"}} + assert_response :success + end end