projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18948: Update test.
[arvados.git]
/
services
/
api
/
test
/
unit
/
container_test.rb
diff --git
a/services/api/test/unit/container_test.rb
b/services/api/test/unit/container_test.rb
index 685bd15e6587a8ff167b9b207c4db0a50320e665..bcf99da2e3442ba088d9effbe80a633e6467f857 100644
(file)
--- 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
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
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
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
assert c.update_attributes(exit_code: 1, state: Container::Complete)
end