From 620ff2d3020142da5208879d43e56931f74c40e9 Mon Sep 17 00:00:00 2001 From: Son Chau Date: Fri, 9 Aug 2024 12:38:05 -0700 Subject: [PATCH 1/2] change katsu path to v3 --- defaults/paths.json | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/defaults/paths.json b/defaults/paths.json index 63c60ca..171ac47 100644 --- a/defaults/paths.json +++ b/defaults/paths.json @@ -2,16 +2,16 @@ "paths": { "read": { "get": [ - "/v2/discovery/?.*", - "/v2/authorized/?.*", - "/htsget/v1/variants/?.*", - "/htsget/v1/variants/search", - "/htsget/v1/reads/?.*", - "/htsget/v1/samples/?.*", - "/ga4gh/drs/v1/objects/?.*", - "/ga4gh/drs/v1/cohorts/?.*", - "/ga4gh/drs/v1/cohorts/?.*/status", - "/beacon/v2/g_variants/?.*" + "/v3/discovery/?.*", + "/v3/authorized/?.*", + "/htsget/v1/variants/?.*", + "/htsget/v1/variants/search", + "/htsget/v1/reads/?.*", + "/htsget/v1/samples/?.*", + "/ga4gh/drs/v1/objects/?.*", + "/ga4gh/drs/v1/cohorts/?.*", + "/ga4gh/drs/v1/cohorts/?.*/status", + "/beacon/v2/g_variants/?.*" ], "post": [ "/htsget/v1/variants/search", @@ -20,22 +20,14 @@ ] }, "curate": { - "get": [ - "/htsget/v1/variants/?.*/index", - "/htsget/v1/variants/?.*/verify", - "/htsget/v1/reads/?.*/index", - "/htsget/v1/reads/?.*/verify" - ], - "post": [ - "/ingest/?.*", - "/ga4gh/drs/v1/?.*", - "/v2/ingest/?.*" - ], - "delete": [ - "/ingest/?.*", - "/ga4gh/drs/v1/?.*", - "/v2/ingest/?.*" - ] + "get": [ + "/htsget/v1/variants/?.*/index", + "/htsget/v1/variants/?.*/verify", + "/htsget/v1/reads/?.*/index", + "/htsget/v1/reads/?.*/verify" + ], + "post": ["/ingest/?.*", "/ga4gh/drs/v1/?.*", "/v3/ingest/?.*"], + "delete": ["/ingest/?.*", "/ga4gh/drs/v1/?.*", "/v3/ingest/?.*"] } } } \ No newline at end of file From 3e52283230986a75ae90de3b7344358af4c05eac Mon Sep 17 00:00:00 2001 From: Son Chau Date: Fri, 9 Aug 2024 12:38:19 -0700 Subject: [PATCH 2/2] change katsu test path to v3 --- tests/test_opa_permissions.py | 46 ++++++++++------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/tests/test_opa_permissions.py b/tests/test_opa_permissions.py index fb83b8b..6b5f2fc 100644 --- a/tests/test_opa_permissions.py +++ b/tests/test_opa_permissions.py @@ -243,47 +243,27 @@ def test_site_admin(user, expected_result, site_roles, users, programs): def get_user_datasets(): return [ - ( # site admin should be able to read all datasets + ( # site admin should be able to read all datasets "site_admin", - { - "body": { - "path": "/ga4gh/drs/v1/cohorts/", - "method": "GET" - } - }, - ["SYNTHETIC-1", "SYNTHETIC-2", "SYNTHETIC-3", "SYNTHETIC-4"] + {"body": {"path": "/ga4gh/drs/v1/cohorts/", "method": "GET"}}, + ["SYNTHETIC-1", "SYNTHETIC-2", "SYNTHETIC-3", "SYNTHETIC-4"], ), - ( # user1 can view the datasets it's a member of + ( # user1 can view the datasets it's a member of "user1", - { - "body": { - "path": "/v2/discovery/programs/", - "method": "GET" - } - }, - ["SYNTHETIC-1", "SYNTHETIC-3", "SYNTHETIC-4"] + {"body": {"path": "/v3/discovery/programs/", "method": "GET"}}, + ["SYNTHETIC-1", "SYNTHETIC-3", "SYNTHETIC-4"], ), - ( # user3 can view the datasets it's a member of + DAC programs, - # but SYNTHETIC-1's authorized dates are in the past + ( # user3 can view the datasets it's a member of + DAC programs, + # but SYNTHETIC-1's authorized dates are in the past "user3", - { - "body": { - "path": "/v2/discovery/programs/", - "method": "GET" - } - }, - ["SYNTHETIC-3", "SYNTHETIC-4"] + {"body": {"path": "/v3/discovery/programs/", "method": "GET"}}, + ["SYNTHETIC-3", "SYNTHETIC-4"], ), ( "dac_user", - { - "body": { - "path": "/ga4gh/drs/v1/cohorts", - "method": "GET" - } - }, - ["SYNTHETIC-3"] - ) + {"body": {"path": "/ga4gh/drs/v1/cohorts", "method": "GET"}}, + ["SYNTHETIC-3"], + ), ]