Skip to content

Commit

Permalink
add skip test if there are no granules for a collection (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 authored Aug 13, 2024
1 parent cdc7e82 commit 9b1f372
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/verify_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ def test_concatenate(collection_concept_id, harmony_env, bearer_token):

logging.info("Sending harmony request %s", harmony_client.request_as_url(request))

job1_id = harmony_client.submit(request)
try:
job1_id = harmony_client.submit(request)
except Exception as ex:
if str(ex) == "('Bad Request', 'Error: No matching granules found.')":
if harmony_env == harmony.config.Environment.UAT:
pytest.skip(f"No granules found for UAT collection {collection_concept_id}")
raise ex

logging.info(f'\n{job1_id}')

Expand Down

0 comments on commit 9b1f372

Please sign in to comment.