[ARVADOS] updated: fed8ee006cdfc2029f287c656b184f3ce7507847
Git user
git at public.curoverse.com
Wed Apr 26 10:04:25 EDT 2017
Summary of changes:
.../app/controllers/container_requests_controller.rb | 11 +++++++----
.../test/controllers/container_requests_controller_test.rb | 9 +++++++++
2 files changed, 16 insertions(+), 4 deletions(-)
via fed8ee006cdfc2029f287c656b184f3ce7507847 (commit)
from e7b46691f98bf4e7edcf1ea3b98a677273d70b3b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fed8ee006cdfc2029f287c656b184f3ce7507847
Author: Lucas Di Pentima <lucas at curoverse.com>
Date: Wed Apr 26 11:03:35 2017 -0300
11185: On re-run without reuse, assign 'false' to CR.use_existing. Added related test.
diff --git a/apps/workbench/app/controllers/container_requests_controller.rb b/apps/workbench/app/controllers/container_requests_controller.rb
index 75bcebd..36bda08 100644
--- a/apps/workbench/app/controllers/container_requests_controller.rb
+++ b/apps/workbench/app/controllers/container_requests_controller.rb
@@ -64,10 +64,13 @@ class ContainerRequestsController < ApplicationController
@object = ContainerRequest.new
- # If "no reuse" requested, pass the correct argument to arvados-cwl-runner command.
- if params[:no_reuse] and src.command[0] == 'arvados-cwl-runner'
- command = src.command - ['--enable-reuse']
- command.insert(1, '--disable-reuse')
+ if params[:no_reuse]
+ @object.use_existing = false
+ # If "no reuse" requested, pass the correct argument to arvados-cwl-runner command.
+ if src.command[0] == 'arvados-cwl-runner'
+ command = src.command - ['--enable-reuse']
+ command.insert(1, '--disable-reuse')
+ end
else
command = src.command
end
diff --git a/apps/workbench/test/controllers/container_requests_controller_test.rb b/apps/workbench/test/controllers/container_requests_controller_test.rb
index 6a0dd30..af7abcd 100644
--- a/apps/workbench/test/controllers/container_requests_controller_test.rb
+++ b/apps/workbench/test/controllers/container_requests_controller_test.rb
@@ -57,4 +57,13 @@ class ContainerRequestsControllerTest < ActionController::TestCase
assert_equal completed_cr['cmd'], copied_cr['cmd']
assert_equal completed_cr['runtime_constraints']['ram'], copied_cr['runtime_constraints'][:ram]
end
+
+ test "container request copy without reuse" do
+ completed_cr = api_fixture('container_requests')['completed']
+ post(:copy, {id: completed_cr['uuid']}, session_for(:active))
+ assert_response 302
+ copied_cr = assigns(:object)
+ assert_not_nil copied_cr
+ refute copied_cr['use_existing']
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list