3 class KeepProxyTest < ActionDispatch::IntegrationTest
4 test "request keep disks" do
5 get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active)
6 assert_response :success
7 services = json_response['items']
9 assert_operator 2, :<=, services.length
10 services.each do |service|
11 assert_equal 'disk', service['service_type']
15 test "request keep proxy" do
16 get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active).merge({'HTTP_X_EXTERNAL_CLIENT' => '1'})
17 assert_response :success
18 services = json_response['items']
20 assert_equal 1, services.length
22 assert_equal keep_services(:proxy).uuid, services[0]['uuid']
23 assert_equal keep_services(:proxy).service_host, services[0]['service_host']
24 assert_equal keep_services(:proxy).service_port, services[0]['service_port']
25 assert_equal keep_services(:proxy).service_ssl_flag, services[0]['service_ssl_flag']
26 assert_equal 'proxy', services[0]['service_type']