From 964b1a90ef0a0cf9b06d6e79b57445d08c83b2e9 Mon Sep 17 00:00:00 2001 From: Alexander VanTol Date: Wed, 22 Jan 2025 11:36:39 -0600 Subject: [PATCH] chore(c999): regression test, ensure testing common exchange area for c999 --- tests/test-fence-config.yaml | 3 ++- tests/test_drs.py | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test-fence-config.yaml b/tests/test-fence-config.yaml index 38ccbd147..6fcb80ee2 100755 --- a/tests/test-fence-config.yaml +++ b/tests/test-fence-config.yaml @@ -345,13 +345,14 @@ dbGaP: # have access to the parent study's "common exchange area data" that is not study # specific. The following config is whether or not to parse/handle "c999" codes # for exchange area data - enable_common_exchange_area_access: false + enable_common_exchange_area_access: true # The below configuration is a mapping from studies to their "common exchange area data" # Fence project name a user gets access to when parsing c999 exchange area codes (and # subsequently gives access to an arborist resource representing this common area # as well) study_common_exchange_areas: 'phs000178': 'test_common_exchange_area' + 'phs000298': 'test_common_exchange_area_2' # A mapping from the dbgap study / Fence project to which authorization namespaces the # actual data lives in. For example, `studyX` data may exist in multiple organizations, so # we need to know to map authorization to all orgs resources diff --git a/tests/test_drs.py b/tests/test_drs.py index 1b1e5cda5..9e95aaab6 100644 --- a/tests/test_drs.py +++ b/tests/test_drs.py @@ -361,7 +361,7 @@ def test_passport_use_disabled( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": int(time.time()) + 1001, }, @@ -520,7 +520,7 @@ def test_get_presigned_url_for_non_public_data_with_passport( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": int(time.time()) + 1001, }, @@ -678,7 +678,7 @@ def test_get_presigned_url_with_passport_with_incorrect_authz( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": int(time.time()) + 1001, }, @@ -974,7 +974,7 @@ def test_passport_cache_valid_passport( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": current_time + 1000, }, @@ -1187,7 +1187,7 @@ def test_passport_cache_invalid_passport( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": current_time + 1000, }, @@ -1404,7 +1404,7 @@ def test_passport_cache_expired_in_memory_valid_in_db( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": current_time + 1000, }, @@ -1635,7 +1635,7 @@ def test_passport_cache_expired( "phs_id": "phs000298", "version": "v4", "participant_set": "p3", - "consent_group": "c1", + "consent_group": "c999", "role": "designated user", "expiration": current_time + 2, },