Skip to content

Commit 0ef3d9f

Browse files
authored
Merge branch 'main' into feature/CCM-13711_test-data-variations-2
2 parents 1184ea1 + a1c77ae commit 0ef3d9f

35 files changed

Lines changed: 2074 additions & 13 deletions

.env.template

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,27 @@ API_KEY=
33
HEADERAUTH=
44
PR_NUMBER=prxx # remove if needs to run against main
55
NHSD_APIM_TOKEN=
6+
PROXY_NAME=
7+
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier
8+
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
9+
# * nhs-notify-supplier--ref--nhs-notify-supplier -- ref env
10+
11+
# API Keys
12+
# ========
13+
# In order to find out the value of an environments given API key, follow these steps
14+
# 1. Log in to Non-Prod
15+
# 2. Navigate to 'Publish' > 'Apps' and search for the app linked to authentication
16+
# 3. Copy the "key" from the Credentials related to the app
17+
# Note: For INT and higher environments use developer portal https://identity.prod.api.platform.nhs.uk/
18+
export NON_PROD_API_KEY=xxx
19+
export INTEGRATION_API_KEY=xxx
20+
export PRODUCTION_API_KEY=xxx
21+
22+
# Private Keys
23+
# ============
24+
# private key used to generate authentication for tests ran against the internal-dev and internal-qa
25+
export NON_PROD_PRIVATE_KEY=xxx # path to the private key file
26+
# private key used to generate authentication for tests ran against the int environment
27+
export INTEGRATION_PRIVATE_KEY=xxx
28+
# private key used to generate authentication for tests ran against the prod environment
29+
export PRODUCTION_PRIVATE_KEY=xxx

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ dist
3232
/specification/api/components/security/security.yml
3333
/specification/api/components/parameters/authorization/authorization.yml
3434
/scripts/JWT/*.pem
35+
/tests/e2e-tests/test-report.xml
3536

3637
# ignore PACTS
3738
.pacts
39+
40+
# python venvs
41+
.venv/
42+
venv/
43+
env/
44+
ENV/

Makefile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,54 @@ ${VERBOSE}.SILENT: \
121121
config \
122122
dependencies \
123123
deploy \
124+
125+
#####################
126+
# E2E Test commands #
127+
#####################
128+
129+
TEST_CMD := APIGEE_ACCESS_TOKEN="$(APIGEE_ACCESS_TOKEN)" \
130+
PYTHONPATH=. poetry run pytest --disable-warnings -vv \
131+
--color=yes \
132+
-n 4 \
133+
--api-name=nhs-notify-supplier \
134+
--proxy-name="$(PROXY_NAME)" \
135+
-s \
136+
--reruns 5 \
137+
--reruns-delay 5 \
138+
--only-rerun 'AssertionError: Unexpected 429' \
139+
--only-rerun 'AssertionError: Unexpected 504' \
140+
--only-rerun 'AssertionError: Unexpected 502' \
141+
--junitxml=test-report.xml
142+
143+
144+
.internal-dev-test:
145+
@cd tests/e2e-tests && \
146+
$(TEST_CMD) \
147+
api \
148+
-m devtest
149+
150+
.integration-test:
151+
$(TEST_CMD) \
152+
tests/api \
153+
-m inttest
154+
155+
156+
PROD_CMD := APIGEE_ACCESS_TOKEN="$(APIGEE_ACCESS_TOKEN)" \
157+
PYTHONPATH=. poetry run pytest --disable-warnings -vv \
158+
--color=yes \
159+
-n 4 \
160+
--api-name=nhs-notify-supplier \
161+
--proxy-name="$(PROXY_NAME)" \
162+
-s \
163+
--reruns 5 \
164+
--reruns-delay 5 \
165+
--only-rerun 'AssertionError: Unexpected 429' \
166+
--only-rerun 'AssertionError: Unexpected 504' \
167+
--only-rerun 'AssertionError: Unexpected 502' \
168+
--junitxml=test-report.xml
169+
170+
.prod-test:
171+
@cd tests/e2e-tests && \
172+
$(PROD_CMD) \
173+
tests/api \
174+
-m prodtest

infrastructure/terraform/components/api/module_lambda_get_letter.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "get_letter" {
2424
function_include_common = true
2525
handler_function_name = "getLetter"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_get_letters.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "get_letters" {
2424
function_include_common = true
2525
handler_function_name = "getLetters"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 1024
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_get_status.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "get_status" {
2424
function_include_common = true
2525
handler_function_name = "getStatus"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_letter_status_update.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "letter_status_update" {
2424
function_include_common = true
2525
handler_function_name = "letterStatusUpdate"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_mi_updates_transformer.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "mi_updates_transformer" {
2424
function_include_common = true
2525
handler_function_name = "handler"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_patch_letter.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "patch_letter" {
2424
function_include_common = true
2525
handler_function_name = "patchLetter"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

infrastructure/terraform/components/api/module_lambda_post_mi.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "post_mi" {
2424
function_include_common = true
2525
handler_function_name = "postMI"
2626
runtime = "nodejs22.x"
27-
memory = 128
27+
memory = 512
2828
timeout = 29
2929
log_level = var.log_level
3030

0 commit comments

Comments
 (0)