Skip to content

Commit 0d3b158

Browse files
authored
Merge pull request #513 from NHSDigital/release/2025-02-24
release/2025-02-24
2 parents 76220f2 + 6347d13 commit 0d3b158

File tree

22 files changed

+1706
-2365
lines changed

22 files changed

+1706
-2365
lines changed

.github/workflows/pull-requests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
runs-on: [self-hosted, ci]
223223
strategy:
224224
matrix:
225-
test-type: [integration, s3]
225+
test-type: [integration]
226226
steps:
227227
- uses: actions/checkout@v4
228228
with:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2025-02-24
4+
- [PI-794] Remove EPR S3 tests
5+
- [PI-788] Create Product Search and Delete Flows for test UI
6+
37
## 2025-02-21
48
- [PI-754] Search Product
59
- Dependabot: datamodel-code-generator

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.02.21.a
1+
2025.02.24

changelog/2025-02-24.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [PI-794] Remove EPR S3 tests
2+
- [PI-788] Create Product Search and Delete Flows for test UI

infrastructure/swagger/05_paths.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ tags:
1616
description: Create, Read and Delete Product IDs
1717
- name: Options
1818
description: These exist for CORS
19+
- name: Core EPR Creation Endpoints
20+
description: Core EPR API creation endpoints
21+
- name: Core EPR Read Endpoints
22+
description: Core EPR API read endpoints
23+
- name: Core EPR Deletion Endpoints
24+
description: Core EPR API deletion endpoints
25+
- name: SDS Search Endpoints
26+
description: Search Results provided for the SDS FHIR API
27+
1928
paths:
2029
/_status:
2130
get:
@@ -298,6 +307,48 @@ paths:
298307
- app-level0: []
299308

300309
/ProductTeam/{product_team_id}/Product/{product_id}:
310+
options:
311+
operationId: productactions
312+
summary: Product actions (OPTIONS)
313+
parameters:
314+
- $ref: "#/components/parameters/ProductTeamId"
315+
- $ref: "#/components/parameters/ProductId"
316+
tags:
317+
- Core Product ID Endpoints
318+
responses:
319+
"400":
320+
$ref: "#/components/responses/BadRequest"
321+
"200":
322+
description: "200 response"
323+
headers:
324+
Access-Control-Allow-Origin:
325+
schema:
326+
type: "string"
327+
Access-Control-Allow-Methods:
328+
schema:
329+
type: "string"
330+
Access-Control-Allow-Headers:
331+
schema:
332+
type: "string"
333+
content:
334+
application/json:
335+
schema:
336+
$ref: "#/components/schemas/Empty"
337+
x-amazon-apigateway-integration:
338+
responses:
339+
default:
340+
statusCode: "200"
341+
responseParameters:
342+
method.response.header.Access-Control-Allow-Methods: "'GET,OPTIONS,POST,DELETE'"
343+
method.response.header.Access-Control-Allow-Headers: "'apikey,authorization,content-type,version'"
344+
method.response.header.Access-Control-Allow-Origin: "'*'"
345+
requestTemplates:
346+
application/json: '{"statusCode": 200}'
347+
passthroughBehavior: "never"
348+
type: "mock"
349+
security:
350+
- ${authoriser_name}: []
351+
- app-level0: []
301352
get:
302353
operationId: readproductendpoint
303354
summary: Read a Product resource (GET)

infrastructure/swagger/12_components--responses.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,18 @@ components:
8686
headers:
8787
Access-Control-Allow-Origin:
8888
schema:
89-
type: string
90-
example: "*"
89+
$ref: "#/components/schemas/ErrorResponse"
90+
examples:
91+
ValidationErrorExtraFields:
92+
value:
93+
errors:
94+
- code: "VALIDATION_ERROR"
95+
message: "SearchSDSEndpointQueryParams.foo: extra fields not permitted"
96+
ValidationError:
97+
value:
98+
errors:
99+
- code: "VALIDATION_ERROR"
100+
message: "SearchSDSEndpointQueryParams.__root__: At least 2 query parameters should be provided of type, nhs_id_code, nhs_mhs_svc_ia and nhs_mhs_party_key"
91101
UnprocessableContent:
92102
description: Unprocessable Content
93103
content:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "connecting-party-manager"
3-
version = "2025.02.21.a"
3+
version = "2025.02.24"
44
description = "Repository for the Connecting Party Manager API and related services"
55
authors = ["NHS England"]
66
license = "LICENSE.md"

scripts/test/test.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test--integration: aws--login ## Run integration (pytest) tests
2424
test--slow: ## Run slow (pytest) tests
2525
$(MAKE) _pytest _INTERNAL_FLAGS="-m 'slow'" _CACHE_CLEAR=$(_CACHE_CLEAR)
2626

27-
test--s3: aws--login ## Run (pytest) tests that require s3 downloads
28-
$(MAKE) _pytest _INTERNAL_FLAGS="-m 's3' $(_INTERNAL_FLAGS)" _CACHE_CLEAR=$(_CACHE_CLEAR) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN)
27+
# test--s3: aws--login ## Run (pytest) tests that require s3 downloads
28+
# $(MAKE) _pytest _INTERNAL_FLAGS="-m 's3' $(_INTERNAL_FLAGS)" _CACHE_CLEAR=$(_CACHE_CLEAR) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN)
2929

3030
test--smoke: aws--login ## Run end-to-end smoke tests (pytest)
3131
AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN) WORKSPACE=$(WORKSPACE) ACCOUNT=$(ACCOUNT) poetry run python -m pytest $(PYTEST_FLAGS) -m 'smoke' --ignore=src/layers --ignore=src/etl --ignore=archived_epr $(_CACHE_CLEAR)

src/api/tests/smoke_tests/test_smoke.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,25 @@ def _request(base_url: str, headers: dict, path: str, method: str):
8383
"SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: ('product_team_id', 'organisation_code')."
8484
],
8585
],
86+
[
87+
"/ProductTeam/123/Product/abc",
88+
"DELETE",
89+
404,
90+
],
91+
[
92+
"/ProductTeam/123",
93+
"DELETE",
94+
404,
95+
],
96+
[
97+
"/Product",
98+
"GET",
99+
400,
100+
["VALIDATION_ERROR"],
101+
[
102+
"SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: ('product_team_id', 'organisation_code')."
103+
],
104+
],
86105
],
87106
)
88107
def test_smoke_tests(request_details):
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
from io import BytesIO
1+
# from io import BytesIO
22

3-
import pytest
4-
from etl_utils.io import pkl_dump_lz4, pkl_dumps_lz4, pkl_load_lz4
5-
from etl_utils.io.test.io_utils import pkl_loads_lz4
6-
from event.json import json_load
3+
# from etl_utils.io import pkl_dump_lz4, pkl_dumps_lz4, pkl_load_lz4
4+
# from etl_utils.io.test.io_utils import pkl_loads_lz4
5+
# from event.json import json_load
6+
# import pytest
77

8-
from etl.sds.tests.constants import EtlTestDataPath
8+
# from etl.sds.tests.constants import EtlTestDataPath
99

1010

11-
@pytest.mark.s3(EtlTestDataPath.FULL_JSON)
12-
def test_pkl_lz4(test_data_paths):
13-
(path,) = test_data_paths
14-
with open(path, "rb") as f:
15-
data = json_load(f)
11+
# @pytest.mark.s3(EtlTestDataPath.FULL_JSON) Uncomment this when archived
12+
# def test_pkl_lz4(test_data_paths):
13+
# (path,) = test_data_paths
14+
# with open(path, "rb") as f:
15+
# data = json_load(f)
1616

17-
buffer = BytesIO()
18-
pkl_dump_lz4(fp=buffer, obj=data)
19-
buffer.seek(0)
20-
assert pkl_load_lz4(fp=buffer) == data
17+
# buffer = BytesIO()
18+
# pkl_dump_lz4(fp=buffer, obj=data)
19+
# buffer.seek(0)
20+
# assert pkl_load_lz4(fp=buffer) == data
2121

2222

23-
@pytest.mark.s3(EtlTestDataPath.FULL_JSON)
24-
def test_pkl_lz4_bytes(test_data_paths):
25-
(path,) = test_data_paths
26-
with open(path, "rb") as f:
27-
data = json_load(f)
23+
# @pytest.mark.s3(EtlTestDataPath.FULL_JSON) Uncomment this when archived
24+
# def test_pkl_lz4_bytes(test_data_paths):
25+
# (path,) = test_data_paths
26+
# with open(path, "rb") as f:
27+
# data = json_load(f)
2828

29-
data_as_bytes = pkl_dumps_lz4(obj=data)
30-
assert pkl_loads_lz4(data=data_as_bytes) == data
29+
# data_as_bytes = pkl_dumps_lz4(obj=data)
30+
# assert pkl_loads_lz4(data=data_as_bytes) == data

0 commit comments

Comments
 (0)