From 48694918fb3e78857d921766784f04cc49dc1ab1 Mon Sep 17 00:00:00 2001 From: radhika Date: Thu, 25 Sep 2014 11:47:54 -0400 Subject: [PATCH] 3889: break the "add keep disk with no filesystem_uuid" test into two tests, instead of doing two post actions in the same test. --- .../arvados/v1/keep_disks_controller_test.rb | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb b/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb index a41531afe5..ea7b5b765a 100644 --- a/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb +++ b/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb @@ -16,18 +16,16 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase assert_not_equal '', new_keep_disk['ping_secret'] end - test "add keep disk with no filesystem_uuid" do - authorize_with :admin - opts = { - ping_secret: '', - } - post :ping, opts - assert_response :success - assert_not_nil JSON.parse(@response.body)['uuid'] - - post :ping, opts.merge(filesystem_uuid: '') - assert_response :success - assert_not_nil JSON.parse(@response.body)['uuid'] + [ + {ping_secret: ''}, + {ping_secret: '', filesystem_uuid: ''}, + ].each do |opts| + test "add keep disk with no filesystem_uuid #{opts}" do + authorize_with :admin + post :ping, opts + assert_response :success + assert_not_nil JSON.parse(@response.body)['uuid'] + end end test "refuse to add keep disk without admin token" do -- 2.30.2