From: Peter Amstutz Date: Tue, 26 Mar 2019 18:38:59 +0000 (-0400) Subject: 13996: Explicitly get string representation of URLs X-Git-Tag: 1.4.0~65^2~20 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/17028c6f18a3e83b39de1655b6bfeafe2938220d 13996: Explicitly get string representation of URLs Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/services/api/app/controllers/arvados/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb index 5f042877de..222b106a97 100644 --- a/services/api/app/controllers/arvados/v1/schema_controller.rb +++ b/services/api/app/controllers/arvados/v1/schema_controller.rb @@ -63,10 +63,10 @@ class Arvados::V1::SchemaController < ApplicationController crunchLogUpdateSize: Rails.configuration.Containers["Logging"]["LogUpdateSize"], remoteHosts: Rails.configuration.RemoteClusters.map {|k,v| v["Host"]}, remoteHostsViaDNS: Rails.configuration.RemoteClusters["*"]["Proxy"], - websocketUrl: Rails.configuration.Services["Websocket"]["ExternalURL"], - workbenchUrl: Rails.configuration.Services["Workbench1"]["ExternalURL"], - keepWebServiceUrl: Rails.configuration.Services["WebDAV"]["ExternalURL"], - gitUrl: Rails.configuration.Services["GitHTTP"]["ExternalURL"], + websocketUrl: Rails.configuration.Services["Websocket"]["ExternalURL"].to_s, + workbenchUrl: Rails.configuration.Services["Workbench1"]["ExternalURL"].to_s, + keepWebServiceUrl: Rails.configuration.Services["WebDAV"]["ExternalURL"].to_s, + gitUrl: Rails.configuration.Services["GitHTTP"]["ExternalURL"].to_s, parameters: { alt: { type: "string", diff --git a/services/api/test/functional/arvados/v1/schema_controller_test.rb b/services/api/test/functional/arvados/v1/schema_controller_test.rb index 5c7b54067b..80cd6de16a 100644 --- a/services/api/test/functional/arvados/v1/schema_controller_test.rb +++ b/services/api/test/functional/arvados/v1/schema_controller_test.rb @@ -33,8 +33,8 @@ class Arvados::V1::SchemaControllerTest < ActionController::TestCase assert_match(/^[0-9a-f]+(-modified)?$/, discovery_doc['source_version']) assert_match(/^[0-9a-f]+(-modified)?$/, discovery_doc['sourceVersion']) assert_match(/^unknown$/, discovery_doc['packageVersion']) - assert_equal discovery_doc['websocketUrl'], Rails.configuration.Services["Websocket"]["ExternalURL"] - assert_equal discovery_doc['workbenchUrl'], Rails.configuration.Services["Workbench1"]["ExternalURL"] + assert_equal discovery_doc['websocketUrl'], Rails.configuration.Services["Websocket"]["ExternalURL"].to_s + assert_equal discovery_doc['workbenchUrl'], Rails.configuration.Services["Workbench1"]["ExternalURL"].to_s assert_equal('zzzzz', discovery_doc['uuidPrefix']) end