Skip to content

Commit a9c6adc

Browse files
committed
Tidy up unused code
1 parent f844532 commit a9c6adc

1 file changed

Lines changed: 1 addition & 27 deletions

File tree

tests/e2e-tests/lib/fixtures.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,4 @@ def bearer_token(authentication_cache):
6565

6666
@pytest.fixture(scope='session')
6767
def status_endpoint_api_key():
68-
"""
69-
Fetch the API key used to authenticate against the /_status endpoint.
70-
Checks STATUS_ENDPOINT_API_KEY env var first, then falls back to
71-
retrieving it from the mock-jwks proxy using NON_PROD_API_KEY.
72-
"""
73-
import requests
74-
75-
key = os.environ.get("STATUS_ENDPOINT_API_KEY", "")
76-
if key:
77-
return key
78-
79-
environment = os.environ["API_ENVIRONMENT"]
80-
non_prod_api_key = os.environ["NON_PROD_API_KEY"]
81-
82-
if environment == "prod":
83-
mock_jwks_base = "https://api.service.nhs.uk"
84-
elif environment == "ref":
85-
mock_jwks_base = "https://internal-dev.api.service.nhs.uk"
86-
else:
87-
mock_jwks_base = f"https://{environment}.api.service.nhs.uk"
88-
89-
resp = requests.get(
90-
f"{mock_jwks_base}/mock-jwks/status-endpoint-api-key",
91-
headers={"apikey": non_prod_api_key},
92-
)
93-
resp.raise_for_status()
94-
return resp.text
68+
return os.environ["STATUS_ENDPOINT_API_KEY"]

0 commit comments

Comments
 (0)