Skip to content

Commit 3c1ebeb

Browse files
committed
VED-740B: testing FHIR/R4 removal
1 parent 069b5b4 commit 3c1ebeb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

e2e/utils/resource.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import re
23
import os
34
import uuid
45
import boto3
@@ -175,7 +176,7 @@ def delete_imms_records(identifiers: list[str]) -> None:
175176

176177
def get_service_url(
177178
service_env: str = os.getenv("IMMUNIZATION_ENV"),
178-
service_base_path: str = os.getenv("IMMUNIZATION_BASE_PATH"),
179+
service_base_path: str = os.getenv("SERVICE_BASE_PATH"),
179180
):
180181
non_prod = ["internal-dev", "int", "sandbox"]
181182
if service_env in non_prod:
@@ -184,4 +185,7 @@ def get_service_url(
184185
subdomain = ""
185186
else:
186187
subdomain = "internal-dev."
187-
return f"https://{subdomain}api.service.nhs.uk/{service_base_path}"
188+
189+
service_base_path = re.sub(r"immunisation-fhir-api/FHIR/R4-pr-(\d+)", r"immunisation-fhir-api-pr-\1", service_base_path)
190+
191+
return f"{subdomain}api.service.nhs.uk/{service_base_path}"

0 commit comments

Comments
 (0)