Skip to content

Commit ac35d04

Browse files
committed
IT allows 401 responses for file downloads from outside of Terra (#7660)
1 parent 795a711 commit ac35d04

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/integration_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,13 @@ def _test_file_download(self, source: SourceSpec, file: JSON) -> mutable_furl:
11521152
self.assertEqual(file_url.path.segments[0], 'repository')
11531153
file_url.path.segments.insert(0, 'fetch')
11541154
response = self._get_url_unchecked(GET, file_url)
1155-
self.assertEqual(200, response.status)
1155+
if response.status == 401:
1156+
msg = json.loads(response.data)['Message']
1157+
prefix = 'Unexpected response from '
1158+
self.assertEqual(prefix, msg[:len(prefix)])
1159+
self.assertNotIn(str(config.terra_service_url), msg)
1160+
else:
1161+
self.assertEqual(200, response.status)
11561162
response = json.loads(response.data)
11571163
while response['Status'] != 302:
11581164
self.assertEqual(301, response['Status'])

0 commit comments

Comments
 (0)