X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fa8ab6f3576881b80e2edf4b9066ca15f46f05b4..488a811374ff4bdeed9f2f2f57d9ef31d9369b5b:/services/api/test/functional/arvados/v1/keep_disks_controller_test.rb 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 3ccfa055e7..a41531afe5 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 @@ -6,9 +6,6 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase authorize_with :admin post :ping, { ping_secret: '', # required by discovery doc, but ignored - service_host: '::1', - service_port: 55555, - service_ssl_flag: false, filesystem_uuid: 'eb1e77a1-db84-4193-b6e6-ca2894f67d5f' } assert_response :success @@ -23,9 +20,6 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase authorize_with :admin opts = { ping_secret: '', - service_host: '::1', - service_port: 55555, - service_ssl_flag: false } post :ping, opts assert_response :success @@ -39,16 +33,13 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase test "refuse to add keep disk without admin token" do post :ping, { ping_secret: '', - service_host: '::1', - service_port: 55555, - service_ssl_flag: false } assert_response 404 end test "ping keep disk" do post :ping, { - uuid: keep_disks(:nonfull).uuid, + id: keep_disks(:nonfull).uuid, ping_secret: keep_disks(:nonfull).ping_secret, filesystem_uuid: keep_disks(:nonfull).filesystem_uuid } @@ -76,6 +67,10 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase assert_response :success items = JSON.parse(@response.body)['items'] assert_not_equal 0, items.size + + # Check these are still included + assert items[0]['service_host'] + assert items[0]['service_port'] end # active user sees non-secret attributes of keep disks @@ -94,4 +89,15 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase end end + test "search keep_services with 'any' operator" do + authorize_with :active + get :index, { + where: { any: ['contains', 'o2t1q5w'] } + } + assert_response :success + found = assigns(:objects).collect(&:uuid) + assert_equal true, !!found.index('zzzzz-penuu-5w2o2t1q5wy7fhn') + end + + end