Skip to content

Commit

Permalink
Fix transient IT failure (#5167)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Jun 16, 2023
1 parent 0bcb15e commit b69dd11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,19 +1242,19 @@ def _test_managed_access_manifest(self,
"""
endpoint = config.service_endpoint

def bundle_uuid(hit: JSON) -> str:
return one(hit['bundles'])['bundleUuid']
def bundle_uuids(hit: JSON) -> set[str]:
return {bundle['bundleUuid'] for bundle in hit['bundles']}

managed_access_bundles = {
bundle_uuid(file)
managed_access_bundles = set.union(*(
bundle_uuids(file)
for file in files
if len(file['sources']) == 1
}
))
filters = {'sourceId': {'is': [source_id]}}
params = {'size': 1, 'catalog': catalog, 'filters': json.dumps(filters)}
bundles_url = furl(url=endpoint, path=['index', self._bundle_type(catalog)], args=params)
response = self._get_url_json(bundles_url)
public_bundle = bundle_uuid(one(response['hits']))
public_bundle = first(bundle_uuids(one(response['hits'])))
self.assertNotIn(public_bundle, managed_access_bundles)

filters = {'bundleUuid': {'is': [public_bundle, *managed_access_bundles]}}
Expand Down

0 comments on commit b69dd11

Please sign in to comment.