X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/56d21dc3d5823117729df3db6186da96f277b328..eeef002557bc361a10483d1924c49e35e8a23fde:/services/api/test/functional/arvados/v1/keep_services_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/keep_services_controller_test.rb b/services/api/test/functional/arvados/v1/keep_services_controller_test.rb index bfa138d72c..d571610fc2 100644 --- a/services/api/test/functional/arvados/v1/keep_services_controller_test.rb +++ b/services/api/test/functional/arvados/v1/keep_services_controller_test.rb @@ -1,8 +1,12 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase - test "search keep_services by service_port with < query" do + test "search by service_port with < query" do authorize_with :active get :index, { filters: [['service_port', '<', 25107]] @@ -11,7 +15,7 @@ class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase assert_equal false, assigns(:objects).any? end - test "search keep_disks by service_port with >= query" do + test "search by service_port with >= query" do authorize_with :active get :index, { filters: [['service_port', '>=', 25107]] @@ -20,4 +24,16 @@ class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase assert_equal true, assigns(:objects).any? end + [:admin, :active, :inactive, :anonymous, nil].each do |u| + test "accessible to #{u.inspect} user" do + authorize_with(u) if u + get :accessible + assert_response :success + assert_not_empty json_response['items'] + json_response['items'].each do |ks| + assert_not_equal ks['service_type'], 'proxy' + end + end + end + end