Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transient IT failure (#5167) #5326

Merged
Merged
Changes from all 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
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
hannes-ucsc marked this conversation as resolved.
Show resolved Hide resolved
}
))
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