Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gslib/tests/test_shim_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ def test_gcs_json_endpoint_translation(self):
self.assertEqual(
env_vars, {
'CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE':
'https://foo_host:1234/storage/v2',
'https://foo_host:1234/storage/v2/',
})

def test_gcs_json_endpoint_translation_with_missing_port(self):
Expand All @@ -1265,7 +1265,7 @@ def test_gcs_json_endpoint_translation_with_missing_port(self):
self.assertEqual(flags, [])
self.assertEqual(env_vars, {
'CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE':
'https://foo_host/storage/v2',
'https://foo_host/storage/v2/',
})

def test_gcs_json_endpoint_translation_usees_default_version_v1(self):
Expand All @@ -1279,7 +1279,7 @@ def test_gcs_json_endpoint_translation_usees_default_version_v1(self):
self.assertEqual(
env_vars, {
'CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE':
'https://foo_host:1234/storage/v1'
'https://foo_host:1234/storage/v1/'
})

def test_s3_endpoint_translation(self):
Expand Down
2 changes: 1 addition & 1 deletion gslib/utils/shim_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _get_gcs_json_endpoint_from_boto_config(config):
gs_json_port = config.get('Credentials', 'gs_json_port')
port = ':' + gs_json_port if gs_json_port else ''
json_api_version = config.get('Credentials', 'json_api_version', 'v1')
return 'https://{}{}/storage/{}'.format(gs_json_host, port,
return 'https://{}{}/storage/{}/'.format(gs_json_host, port,
json_api_version)
return None

Expand Down