From: Tom Clegg Date: Fri, 24 Jun 2022 14:05:17 +0000 (-0400) Subject: 18948: Update test. X-Git-Tag: 2.5.0~131^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/40dc04d6fa45b6b727e94986491c06132db4a582?ds=inline 18948: Update test. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb index 685bd15e65..bcf99da2e3 100644 --- a/services/api/test/unit/container_test.rb +++ b/services/api/test/unit/container_test.rb @@ -870,16 +870,14 @@ class ContainerTest < ActiveSupport::TestCase end end - test "Container only set exit code on complete" do + test "can only change exit code while running and at completion" do set_user_from_auth :active c, _ = minimal_new set_user_from_auth :dispatch1 c.lock + check_illegal_updates c, [{exit_code: 1}] c.update_attributes! state: Container::Running - - check_illegal_updates c, [{exit_code: 1}, - {exit_code: 1, state: Container::Cancelled}] - + assert c.update_attributes(exit_code: 1) assert c.update_attributes(exit_code: 1, state: Container::Complete) end