1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class Arvados::V1::KeepServicesControllerTest < ActionController::TestCase
9 test "search by service_port with < query" do
10 authorize_with :active
12 filters: [['service_port', '<', 25107]]
14 assert_response :success
15 assert_equal false, assigns(:objects).any?
18 test "search by service_port with >= query" do
19 authorize_with :active
21 filters: [['service_port', '>=', 25107]]
23 assert_response :success
24 assert_equal true, assigns(:objects).any?
27 [:admin, :active, :inactive, :anonymous, nil].each do |u|
28 test "accessible to #{u.inspect} user" do
29 authorize_with(u) if u
31 assert_response :success
32 assert_not_empty json_response['items']
33 json_response['items'].each do |ks|
34 assert_not_equal ks['service_type'], 'proxy'