1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class KeepProxyTest < ActionDispatch::IntegrationTest
8 test "request keep disks" do
9 get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active)
10 assert_response :success
11 services = json_response['items']
13 assert_operator 2, :<=, services.length
14 services.each do |service|
15 assert_equal 'disk', service['service_type']
19 test "request keep proxy" do
20 get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active).merge({'HTTP_X_EXTERNAL_CLIENT' => '1'})
21 assert_response :success
22 services = json_response['items']
24 assert_equal 1, services.length
26 assert_equal keep_services(:proxy).uuid, services[0]['uuid']
27 assert_equal keep_services(:proxy).service_host, services[0]['service_host']
28 assert_equal keep_services(:proxy).service_port, services[0]['service_port']
29 assert_equal keep_services(:proxy).service_ssl_flag, services[0]['service_ssl_flag']
30 assert_equal 'proxy', services[0]['service_type']