From 40dc04d6fa45b6b727e94986491c06132db4a582 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 24 Jun 2022 10:05:17 -0400 Subject: [PATCH] 18948: Update test. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- services/api/test/unit/container_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.30.2