X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4f552c0187f8c31d94ff74485c57ef7f9888597e..aab0fe9d849952d926a252fac1fedd7e643f5a00:/services/api/test/functional/arvados/v1/job_reuse_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/job_reuse_controller_test.rb b/services/api/test/functional/arvados/v1/job_reuse_controller_test.rb index 03e577f48d..16916b7313 100644 --- a/services/api/test/functional/arvados/v1/job_reuse_controller_test.rb +++ b/services/api/test/functional/arvados/v1/job_reuse_controller_test.rb @@ -2,7 +2,7 @@ require 'test_helper' load 'test/functional/arvados/v1/git_setup.rb' class Arvados::V1::JobReuseControllerTest < ActionController::TestCase - fixtures :repositories, :users, :jobs, :links + fixtures :repositories, :users, :jobs, :links, :collections # See git_setup.rb for the commit log for test.git.tar include GitSetup @@ -26,6 +26,24 @@ class Arvados::V1::JobReuseControllerTest < ActionController::TestCase assert_equal '4fe459abe02d9b365932b8f5dc419439ab4e2577', new_job['script_version'] end + test "test_cannot_reuse_job_no_output" do + @controller = Arvados::V1::JobsController.new + authorize_with :active + post :create, job: { + script: "hash", + script_version: "4fe459abe02d9b365932b8f5dc419439ab4e2577", + repository: "foo", + script_parameters: { + input: 'fa7aeb5140e2848d39b416daeef4ffc5+45', + an_integer: '2' + } + } + assert_response :success + assert_not_nil assigns(:object) + new_job = JSON.parse(@response.body) + assert_not_equal 'zzzzz-8i9sb-cjs4pklxxjykppp', new_job['uuid'] + end + test "test_reuse_job_range" do @controller = Arvados::V1::JobsController.new authorize_with :active