diff options
| author | Claude | 2026-08-31 00:00:00 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-31 14:46:39 -0500 |
| commit | 1ad5a66b33cd880234937fe2e069a09887698265 (patch) | |
| tree | 81e7ebc55b1f077dd373d5848cd4d48718a7deeb | |
| parent | e3b3a46eece9487cf1e0c0f8b130afc2e190ce7e (diff) | |
| download | gn-integration-tests-1ad5a66b33cd880234937fe2e069a09887698265.tar.gz | |
test(smoke): migrate auth/system/roles -> auth/resource/system/roles
Update all references in the smoke tests (URLs and comments) to use the non-deprecated endpoint path.
| -rw-r--r-- | tests/test_gn_auth_smoke.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_gn_auth_smoke.py b/tests/test_gn_auth_smoke.py index 4ff067a..11fdf33 100644 --- a/tests/test_gn_auth_smoke.py +++ b/tests/test_gn_auth_smoke.py @@ -51,21 +51,21 @@ class TestPublicJwks: # --------------------------------------------------------------------------- -# GET /auth/system/roles (no token → public-view only) +# GET /auth/resource/system/roles (no token → public-view only) # --------------------------------------------------------------------------- class TestSystemRolesUnauthenticated: def test_returns_200_without_token(self, gn_auth_url, http): - resp = http.get(f"{gn_auth_url}/auth/system/roles", timeout=30) + resp = http.get(f"{gn_auth_url}/auth/resource/system/roles", timeout=30) assert resp.status_code == 200 def test_response_is_list(self, gn_auth_url, http): - resp = http.get(f"{gn_auth_url}/auth/system/roles", timeout=30) + resp = http.get(f"{gn_auth_url}/auth/resource/system/roles", timeout=30) data = resp.json() assert isinstance(data, list), f"Expected list, got: {type(data)}" def test_contains_public_view_role(self, gn_auth_url, http): - resp = http.get(f"{gn_auth_url}/auth/system/roles", timeout=30) + resp = http.get(f"{gn_auth_url}/auth/resource/system/roles", timeout=30) roles = resp.json() names = [r.get("role_name") for r in roles] assert "public-view" in names, ( @@ -73,7 +73,7 @@ class TestSystemRolesUnauthenticated: ) def test_public_view_role_has_privileges(self, gn_auth_url, http): - resp = http.get(f"{gn_auth_url}/auth/system/roles", timeout=30) + resp = http.get(f"{gn_auth_url}/auth/resource/system/roles", timeout=30) public_view = next( (r for r in resp.json() if r.get("role_name") == "public-view"), None ) @@ -82,7 +82,7 @@ class TestSystemRolesUnauthenticated: assert len(public_view["privileges"]) >= 1 def test_role_schema(self, gn_auth_url, http): - resp = http.get(f"{gn_auth_url}/auth/system/roles", timeout=30) + resp = http.get(f"{gn_auth_url}/auth/resource/system/roles", timeout=30) for role in resp.json(): assert "role_id" in role, f"Role missing 'role_id': {role}" assert "role_name" in role, f"Role missing 'role_name': {role}" @@ -191,13 +191,13 @@ class TestDataAuthorisation: # --------------------------------------------------------------------------- -# GET /auth/system/roles (with valid token — Phase 2) +# GET /auth/resource/system/roles (with valid token — Phase 2) # --------------------------------------------------------------------------- class TestSystemRolesAuthenticated: def test_returns_200_with_token(self, gn_auth_url, http, access_token): resp = http.get( - f"{gn_auth_url}/auth/system/roles", + f"{gn_auth_url}/auth/resource/system/roles", headers={"Authorization": f"Bearer {access_token}"}, timeout=30, ) @@ -205,7 +205,7 @@ class TestSystemRolesAuthenticated: def test_authenticated_user_has_more_than_public_view(self, gn_auth_url, http, access_token): resp = http.get( - f"{gn_auth_url}/auth/system/roles", + f"{gn_auth_url}/auth/resource/system/roles", headers={"Authorization": f"Bearer {access_token}"}, timeout=30, ) |
