X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d5823126a51b7c31915e01fee100abe9468014e5..06e402b11ad4d503feb5fa45845cb27c93478cfc:/services/api/test/integration/keep_proxy_test.rb diff --git a/services/api/test/integration/keep_proxy_test.rb b/services/api/test/integration/keep_proxy_test.rb index d4155c2c4a..aacda517f2 100644 --- a/services/api/test/integration/keep_proxy_test.rb +++ b/services/api/test/integration/keep_proxy_test.rb @@ -6,20 +6,23 @@ class KeepProxyTest < ActionDispatch::IntegrationTest assert_response :success services = json_response['items'] - assert_equal 2, services.length - assert_equal 'disk', services[0]['service_type'] - assert_equal 'disk', services[1]['service_type'] + assert_operator 2, :<=, services.length + services.each do |service| + assert_equal 'disk', service['service_type'] + end + end + test "request keep proxy" do get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active).merge({'HTTP_X_EXTERNAL_CLIENT' => '1'}) assert_response :success services = json_response['items'] assert_equal 1, services.length - assert_equal "zzzzz-bi6l4-h0a0xwut9qa6g3a", services[0]['uuid'] - assert_equal "keep.qr1hi.arvadosapi.com", services[0]['service_host'] - assert_equal 25333, services[0]['service_port'] - assert_equal true, services[0]['service_ssl_flag'] + assert_equal keep_services(:proxy).uuid, services[0]['uuid'] + assert_equal keep_services(:proxy).service_host, services[0]['service_host'] + assert_equal keep_services(:proxy).service_port, services[0]['service_port'] + assert_equal keep_services(:proxy).service_ssl_flag, services[0]['service_ssl_flag'] assert_equal 'proxy', services[0]['service_type'] end end