From 278971255558491818398ccaaa747c156a61b7f8 Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Mon, 6 Nov 2023 14:18:35 +0000 Subject: [PATCH 1/8] UML-3042 add other names (also known as) field --- .../response_schemas/use_an_lpa_schema.json | 12 ++++++++++ lambda_functions/v1/openapi/lpa-openapi.yml | 6 +++++ .../use_an_lpa_successful_response.json | 4 ++++ .../lpa_online_tool_successful_response.json | 4 ++++ .../lpas/mock_data/use_an_lpa_response.json | 24 +++++++++++++++++++ mock_sirius_backend/sirius_public_api.yaml | 6 +++++ 6 files changed, 56 insertions(+) diff --git a/integration_tests/v1/response_schemas/use_an_lpa_schema.json b/integration_tests/v1/response_schemas/use_an_lpa_schema.json index e88f68c2..1c7dee0b 100644 --- a/integration_tests/v1/response_schemas/use_an_lpa_schema.json +++ b/integration_tests/v1/response_schemas/use_an_lpa_schema.json @@ -38,6 +38,9 @@ "firstname": { "type": "string" }, + "otherNames": { + "type": ["string", "null"] + }, "middlenames": { "type": ["string", "null"] }, @@ -103,6 +106,7 @@ "email", "salutation", "firstname", + "otherNames", "middlenames", "surname", "addresses", @@ -160,6 +164,9 @@ "firstname": { "type": "string" }, + "otherNames": { + "type": ["string", "null"] + }, "middlenames": { "type": ["string", "null"] }, @@ -228,6 +235,7 @@ "email", "salutation", "firstname", + "otherNames", "middlenames", "surname", "addresses", @@ -269,6 +277,9 @@ "firstname": { "type": "string" }, + "otherNames": { + "type": ["string", "null"] + }, "middlenames": { "type": ["string", "null"] }, @@ -331,6 +342,7 @@ "email", "salutation", "firstname", + "otherNames", "middlenames", "surname", "addresses" diff --git a/lambda_functions/v1/openapi/lpa-openapi.yml b/lambda_functions/v1/openapi/lpa-openapi.yml index f314a587..a887d8c3 100644 --- a/lambda_functions/v1/openapi/lpa-openapi.yml +++ b/lambda_functions/v1/openapi/lpa-openapi.yml @@ -638,6 +638,7 @@ components: - dob - salutation - firstname + - otherNames - middlenames - surname - companyName @@ -668,6 +669,11 @@ components: description: The case actor's first name example: Ian maxLength: 255 + otherNames: + type: string + description: The case actor's other name + example: George + maxLength: 255 middlenames: type: string description: The case actor's last name diff --git a/lambda_functions/v1/tests/test_data/use_an_lpa_successful_response.json b/lambda_functions/v1/tests/test_data/use_an_lpa_successful_response.json index 35885605..df278ba2 100644 --- a/lambda_functions/v1/tests/test_data/use_an_lpa_successful_response.json +++ b/lambda_functions/v1/tests/test_data/use_an_lpa_successful_response.json @@ -22,6 +22,7 @@ "dob": "1972-05-10", "email": "bodge@hotmail.com", "firstname": "Trevor", + "otherNames": null, "id": 7, "middlenames": null, "salutation": "Mr", @@ -54,6 +55,7 @@ "dob": null, "email": null, "firstname": "Julian", + "otherNames": null, "id": 5, "middlenames": null, "salutation": "Mr", @@ -79,6 +81,7 @@ "dob": "1952-07-17", "email": "sally.fathing@opgtest.com", "firstname": "changeme", + "otherNames": "Lucy", "id": 1, "middlenames": "Lucille", "salutation": "Mrs", @@ -114,6 +117,7 @@ "dob": null, "email": "", "firstname": null, + "otherNames": null, "id": 6, "middlenames": null, "salutation": null, diff --git a/mock_sirius_backend/api/lpas/mock_data/lpa_online_tool_successful_response.json b/mock_sirius_backend/api/lpas/mock_data/lpa_online_tool_successful_response.json index d92301ed..be889322 100644 --- a/mock_sirius_backend/api/lpas/mock_data/lpa_online_tool_successful_response.json +++ b/mock_sirius_backend/api/lpas/mock_data/lpa_online_tool_successful_response.json @@ -24,6 +24,7 @@ "dob": "1972-05-10", "email": "bodge@hotmail.com", "firstname": "Trevor", + "otherNames": null, "id": 7, "middlenames": null, "salutation": "Mr", @@ -56,6 +57,7 @@ "dob": null, "email": null, "firstname": "Julian", + "otherNames": null, "id": 5, "middlenames": null, "salutation": "Mr", @@ -82,6 +84,7 @@ "dob": "1952-07-17", "email": "sally.fathing@opgtest.com", "firstname": "changeme", + "otherNames": "Lucy", "id": 1, "middlenames": "Lucille", "salutation": "Mrs", @@ -118,6 +121,7 @@ "dob": null, "email": "", "firstname": null, + "otherNames": null, "id": 6, "middlenames": null, "salutation": null, diff --git a/mock_sirius_backend/api/lpas/mock_data/use_an_lpa_response.json b/mock_sirius_backend/api/lpas/mock_data/use_an_lpa_response.json index 3e389343..3fae5022 100644 --- a/mock_sirius_backend/api/lpas/mock_data/use_an_lpa_response.json +++ b/mock_sirius_backend/api/lpas/mock_data/use_an_lpa_response.json @@ -24,6 +24,7 @@ "dob": "1990-05-04", "email": "", "firstname": "jean", + "otherNames": "", "id": 9, "middlenames": "", "salutation": "", @@ -49,6 +50,7 @@ "dob": "1975-10-05", "email": "XXXXX", "firstname": "Ann", + "otherNames": "", "id": 12, "middlenames": "", "salutation": "Mrs", @@ -81,6 +83,7 @@ "dob": null, "email": null, "firstname": "Danielle", + "otherNames": "Dani", "id": 11, "middlenames": null, "salutation": "Miss", @@ -106,6 +109,7 @@ "dob": "1948-11-01", "email": "RachelSanderson@opgtest.com", "firstname": "Rachel", + "otherNames": "Rach", "id": 7, "linked": [ { @@ -155,6 +159,7 @@ "dob": "1975-10-05", "email": "SimonMatthews@opgtest.com", "firstname": "Simon", + "otherNames": "Si", "id": 25, "middlenames": "", "salutation": "Mr", @@ -180,6 +185,7 @@ "dob": "1990-03-17", "email": "", "firstname": "Simone", + "otherNames": "", "id": 2588, "middlenames": "", "salutation": "Miss", @@ -212,6 +218,7 @@ "dob": null, "email": null, "firstname": "Joanne", + "otherNames": null, "id": 27, "middlenames": null, "salutation": "Mrs", @@ -237,6 +244,7 @@ "dob": "1948-11-01", "email": "babaragilson@opgtest.com", "firstname": "Babara", + "otherNames": "Bab", "id": 23, "linked": [ { @@ -286,6 +294,7 @@ "dob": "1975-10-05", "email": "TainaRucker@opgtest.com", "firstname": "Taina", + "otherNames": "", "id": 45, "middlenames": "", "salutation": "Mr", @@ -318,6 +327,7 @@ "dob": null, "email": null, "firstname": "Desire", + "otherNames": null, "id": 47, "middlenames": null, "salutation": "Miss", @@ -343,6 +353,7 @@ "dob": "1948-11-01", "email": "orethalang@opgtest.com", "firstname": "Babara", + "otherNames": "Bab", "id": 43, "linked": [ { @@ -392,6 +403,7 @@ "dob": "1975-10-05", "email": "SimonMatthews@opgtest.com", "firstname": "Simon", + "otherNames": "Si", "id": 64, "middlenames": null, "salutation": "Mr", @@ -417,6 +429,7 @@ "dob": "1975-10-05", "email": null, "firstname": "simone", + "otherNames": null, "id": 3022, "middlenames": null, "salutation": "miss", @@ -449,6 +462,7 @@ "dob": null, "email": null, "firstname": "David", + "otherNames": null, "id": 63, "middlenames": null, "salutation": "Mr", @@ -474,6 +488,7 @@ "dob": "1948-11-01", "email": "linkedpersonone@opgtest.com", "firstname": "Linked", + "otherNames": "", "id": 59, "linked": [ { @@ -523,6 +538,7 @@ "dob": "1975-10-05", "email": "AndreaRobinson@opgtest.com", "firstname": "Andrea", + "otherNames": null, "id": 78, "middlenames": null, "salutation": "Mrs", @@ -555,6 +571,7 @@ "dob": null, "email": null, "firstname": "Rachel", + "otherNames": "Rach", "id": 80, "middlenames": null, "salutation": "Mrs", @@ -580,6 +597,7 @@ "dob": "1948-11-01", "email": "demtriceflood@opgtest.com", "firstname": "Demetrice", + "otherNames": "", "id": 76, "linked": [ { @@ -629,6 +647,7 @@ "dob": "1975-10-05", "email": "SimonMatthews@opgtest.com", "firstname": "Simon", + "otherNames": "Si", "id": 97, "middlenames": null, "salutation": "Mr", @@ -661,6 +680,7 @@ "dob": null, "email": null, "firstname": "David", + "otherNames": null, "id": 96, "middlenames": null, "salutation": "Mr", @@ -686,6 +706,7 @@ "dob": "1948-11-01", "email": "cherrylschindler@opgtest.com", "firstname": "Cherryl", + "otherNames": null, "id": 92, "linked": [ { @@ -735,6 +756,7 @@ "dob": "1975-10-05", "email": "SimonMatthews@opgtest.com", "firstname": "Simon", + "otherNames": "Si", "id": 115, "middlenames": null, "salutation": "Mr", @@ -767,6 +789,7 @@ "dob": null, "email": null, "firstname": "David", + "otherNames": null, "id": 114, "middlenames": null, "salutation": "Mr", @@ -792,6 +815,7 @@ "dob": "1948-11-01", "email": "linkedpersonone@opgtest.com", "firstname": "Linked", + "otherNames": "", "id": 110, "linked": [ { diff --git a/mock_sirius_backend/sirius_public_api.yaml b/mock_sirius_backend/sirius_public_api.yaml index a05b9212..317e1201 100644 --- a/mock_sirius_backend/sirius_public_api.yaml +++ b/mock_sirius_backend/sirius_public_api.yaml @@ -436,6 +436,7 @@ definitions: - dob - salutation - firstname + - otherNames - middlenames - surname - companyName @@ -466,6 +467,11 @@ definitions: description: The case actor's first name example: Ian maxLength: 255 + otherNames: + type: string + description: The case actor's also known as other name + example: George + maxLength: 255 middlenames: type: string description: The case actor's last name From e55d3c44b918c0f26b7a33f0a1625afe7f8555c2 Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Mon, 6 Nov 2023 16:50:55 +0000 Subject: [PATCH 2/8] Update lpa-openapi.yml and sirius_public_api.yml --- lambda_functions/v1/openapi/lpa-openapi.yml | 2 +- mock_sirius_backend/sirius_public_api.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lambda_functions/v1/openapi/lpa-openapi.yml b/lambda_functions/v1/openapi/lpa-openapi.yml index a887d8c3..81cde424 100644 --- a/lambda_functions/v1/openapi/lpa-openapi.yml +++ b/lambda_functions/v1/openapi/lpa-openapi.yml @@ -676,7 +676,7 @@ components: maxLength: 255 middlenames: type: string - description: The case actor's last name + description: The case actor's middle name example: Deputy maxLength: 255 surname: diff --git a/mock_sirius_backend/sirius_public_api.yaml b/mock_sirius_backend/sirius_public_api.yaml index 317e1201..02ab267a 100644 --- a/mock_sirius_backend/sirius_public_api.yaml +++ b/mock_sirius_backend/sirius_public_api.yaml @@ -469,12 +469,12 @@ definitions: maxLength: 255 otherNames: type: string - description: The case actor's also known as other name + description: The case actor's other name example: George maxLength: 255 middlenames: type: string - description: The case actor's last name + description: The case actor's middle name example: Deputy maxLength: 255 surname: From c6f565b7d9c5961c4883f8a4d3fcf1913109032f Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Wed, 8 Nov 2023 10:48:38 +0000 Subject: [PATCH 3/8] WIP to get make setup_all to work --- integration_tests/v1/conftest.py | 8 ++++---- lambda_functions/v1/Dockerfile | 3 ++- lambda_functions/v1/requirements/dev-requirements.txt | 8 ++++---- mock_sirius_backend/requirements.txt | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/integration_tests/v1/conftest.py b/integration_tests/v1/conftest.py index 2a785181..5c5d1514 100644 --- a/integration_tests/v1/conftest.py +++ b/integration_tests/v1/conftest.py @@ -36,25 +36,25 @@ opg_data_lpa_dev_aws = { "name": "new collections api on aws dev", "healthcheck_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", + "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", "method": "GET", }, "online_tool_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" + "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" "-online-tool/lpas", "method": "GET", "valid_lpa_online_tool_ids": ["A33718377316"], "invalid_lpa_online_tool_ids": ["banana"], }, "use_an_lpa_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use" + "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/use" "-an-lpa/lpas", "method": "GET", "valid_sirius_uids": ["700000000047"], "invalid_sirius_uids": ["9"], }, "request_code_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", + "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", "method": "POST", "valid_sirius_lpas": [ {"caseUid": 700000000013, "actorUid": 700000000997}, diff --git a/lambda_functions/v1/Dockerfile b/lambda_functions/v1/Dockerfile index d428f26c..f7bc2442 100644 --- a/lambda_functions/v1/Dockerfile +++ b/lambda_functions/v1/Dockerfile @@ -1,9 +1,10 @@ -FROM python:3.8-slim-buster +FROM python:3.11-slim-buster WORKDIR /var/www/lambda_functions/v1 # Install Python Dependencies COPY requirements requirements RUN cat ./requirements/*.txt | uniq | grep -v "#" > ./requirements/local-requirements.txt +RUN pip install --upgrade pip RUN pip install -r ./requirements/local-requirements.txt EXPOSE 4343 diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index b730d03e..5a93d8db 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -1,4 +1,4 @@ -connexion==2.7.0 +connexion fakeredis==1.4.5 flake8==3.8.4 flake8-quotes==3.2.0 @@ -11,6 +11,6 @@ pytest-html==3.1.1 tenacity==6.3.1 validators==0.18.2 yarl==1.6.3 -importlib-metadata==4.13.0 -opg-sirius-service==2.1.1 -localstack-client==1.39 \ No newline at end of file +importlib-metadata +opg-sirius-service +localstack-client diff --git a/mock_sirius_backend/requirements.txt b/mock_sirius_backend/requirements.txt index fbebc043..fea533dc 100644 --- a/mock_sirius_backend/requirements.txt +++ b/mock_sirius_backend/requirements.txt @@ -1,4 +1,4 @@ -connexion==2.7.0 +connexion Flask==1.1.4 markupsafe==2.0.1 requests From 5a8880934928a65016708aa5f77d053648d6df4a Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Wed, 8 Nov 2023 11:01:46 +0000 Subject: [PATCH 4/8] make setup-all works --- docker-compose.yml | 1 + lambda_functions/v1/requirements/dev-requirements.txt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 570bae7c..3db009c9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: POSTGRES_DB: postgres broker_app: image: pactfoundation/pact-broker + platform: linux/amd64 ports: - "9293:80" - "9292:9292" diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index 5a93d8db..45163d83 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -4,13 +4,13 @@ flake8==3.8.4 flake8-quotes==3.2.0 hypothesis==6.0.0 moto~=4.1 -pytest==6.2.1 -pytest-cov==2.10.1 -pytest-env==0.6.2 -pytest-html==3.1.1 +pytest +pytest-cov +pytest-env +pytest-html tenacity==6.3.1 validators==0.18.2 -yarl==1.6.3 +yarl importlib-metadata opg-sirius-service localstack-client From a879255c3c594a403f06469b5743d14e8f05aa77 Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Wed, 8 Nov 2023 11:29:17 +0000 Subject: [PATCH 5/8] Update readme files, revert python and repin opg-sirius-service --- README.md | 7 +++++++ lambda_functions/v1/Dockerfile | 2 +- lambda_functions/v1/requirements/dev-requirements.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 737240a1..16f02cd8 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,13 @@ is a bit more of an in depth set up process required. - Set the Default Test Runner to 'pytest' - Right click on the tests folder (or single file) > 'Run pytest in tests' + +These tests can also be run with docker, first [set up docker environment](#running-the-api-locally). +Then: + ```shell + docker-compose run unit-test-lpa-data + ``` + ## Integration Tests 1. [Set up local environment](#set-up-local-development-environment-outside-of-docker) diff --git a/lambda_functions/v1/Dockerfile b/lambda_functions/v1/Dockerfile index f7bc2442..f209f088 100644 --- a/lambda_functions/v1/Dockerfile +++ b/lambda_functions/v1/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim-buster +FROM python:3.8-slim-buster WORKDIR /var/www/lambda_functions/v1 # Install Python Dependencies diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index 45163d83..15b4b890 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -12,5 +12,5 @@ tenacity==6.3.1 validators==0.18.2 yarl importlib-metadata -opg-sirius-service +opg-sirius-service==2.1.1 localstack-client From fe6618a6b158e0fba4a0e54bba4cb1659f289d2f Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Fri, 10 Nov 2023 12:22:45 +0000 Subject: [PATCH 6/8] Make setup-all completes with as minimal changes needed --- integration_tests/v1/conftest.py | 8 ++++---- .../v1/requirements/dev-requirements.txt | 14 +++++++------- lambda_functions/v1/requirements/requirements.txt | 2 +- mock_sirius_backend/Dockerfile | 2 +- mock_sirius_backend/requirements.txt | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/integration_tests/v1/conftest.py b/integration_tests/v1/conftest.py index 5c5d1514..d3870e48 100644 --- a/integration_tests/v1/conftest.py +++ b/integration_tests/v1/conftest.py @@ -36,25 +36,25 @@ opg_data_lpa_dev_aws = { "name": "new collections api on aws dev", "healthcheck_endpoint": { - "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", + "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", "method": "GET", }, "online_tool_endpoint": { - "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" + "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" "-online-tool/lpas", "method": "GET", "valid_lpa_online_tool_ids": ["A33718377316"], "invalid_lpa_online_tool_ids": ["banana"], }, "use_an_lpa_endpoint": { - "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/use" + "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use" "-an-lpa/lpas", "method": "GET", "valid_sirius_uids": ["700000000047"], "invalid_sirius_uids": ["9"], }, "request_code_endpoint": { - "url": "https://uml-3042.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", + "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", "method": "POST", "valid_sirius_lpas": [ {"caseUid": 700000000013, "actorUid": 700000000997}, diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index 15b4b890..bd56a1f9 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -1,16 +1,16 @@ -connexion +connexion==2.7.0 fakeredis==1.4.5 flake8==3.8.4 flake8-quotes==3.2.0 hypothesis==6.0.0 moto~=4.1 -pytest -pytest-cov -pytest-env -pytest-html +pytest==6.2.1 +pytest-cov==2.10.1 +pytest-env==0.6.2 +pytest-html==3.1.1 tenacity==6.3.1 validators==0.18.2 -yarl +yarl==1.6.3 importlib-metadata opg-sirius-service==2.1.1 -localstack-client +localstack-client==1.39 diff --git a/lambda_functions/v1/requirements/requirements.txt b/lambda_functions/v1/requirements/requirements.txt index 116e8ba3..96fae198 100644 --- a/lambda_functions/v1/requirements/requirements.txt +++ b/lambda_functions/v1/requirements/requirements.txt @@ -1,7 +1,7 @@ #Update this date to trigger update of layers: 20230619 Flask==2.2.5 markupsafe==2.1.1 -localstack-client==1.10 +localstack-client==1.39 redis==3.5.3 requests==2.31.0 Werkzeug==3.0.1 diff --git a/mock_sirius_backend/Dockerfile b/mock_sirius_backend/Dockerfile index 9d3ac642..c6030e53 100644 --- a/mock_sirius_backend/Dockerfile +++ b/mock_sirius_backend/Dockerfile @@ -1,5 +1,5 @@ # our base image -FROM python:3.6-slim +FROM python:3.8-slim WORKDIR /var/www/ COPY requirements.txt . diff --git a/mock_sirius_backend/requirements.txt b/mock_sirius_backend/requirements.txt index f1df2170..cdaf02a8 100644 --- a/mock_sirius_backend/requirements.txt +++ b/mock_sirius_backend/requirements.txt @@ -1,4 +1,4 @@ connexion==2.7.0 Flask==2.2.5 -markupsafe==2.0.1 +markupsafe==2.1.1 requests From 00671eabc4b3d5ff2aa3ba3d8a4b1f9ec392bda7 Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Mon, 13 Nov 2023 11:00:16 +0000 Subject: [PATCH 7/8] Revert changes to conftest.py --- integration_tests/v1/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/v1/conftest.py b/integration_tests/v1/conftest.py index d3870e48..2a785181 100644 --- a/integration_tests/v1/conftest.py +++ b/integration_tests/v1/conftest.py @@ -36,25 +36,25 @@ opg_data_lpa_dev_aws = { "name": "new collections api on aws dev", "healthcheck_endpoint": { - "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/healthcheck", "method": "GET", }, "online_tool_endpoint": { - "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" "-online-tool/lpas", "method": "GET", "valid_lpa_online_tool_ids": ["A33718377316"], "invalid_lpa_online_tool_ids": ["banana"], }, "use_an_lpa_endpoint": { - "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use" + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use" "-an-lpa/lpas", "method": "GET", "valid_sirius_uids": ["700000000047"], "invalid_sirius_uids": ["9"], }, "request_code_endpoint": { - "url": "https://XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas/requestCode", "method": "POST", "valid_sirius_lpas": [ {"caseUid": 700000000013, "actorUid": 700000000997}, From b790e243466ff740cff3f0fd7051e7721a029c03 Mon Sep 17 00:00:00 2001 From: Mishkat Najam Date: Mon, 13 Nov 2023 13:09:40 +0000 Subject: [PATCH 8/8] Update makefile, pact and dev-requirements --- Makefile | 3 +++ docker-compose.yml | 3 +-- integration_tests/v1/conftest.py | 6 ++---- lambda_functions/v1/requirements/dev-requirements.txt | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 166de68f..4f4560ae 100644 --- a/Makefile +++ b/Makefile @@ -44,3 +44,6 @@ login-api-gateway: logs: docker-compose logs --tail=100 -f $(c) + +unit-tests-all: + docker-compose run unit-test-lpa-data diff --git a/docker-compose.yml b/docker-compose.yml index 3db009c9..fec7108b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,7 @@ services: POSTGRES_PASSWORD: password #pragma: allowlist secret POSTGRES_DB: postgres broker_app: - image: pactfoundation/pact-broker - platform: linux/amd64 + image: pactfoundation/pact-cli:latest-multi ports: - "9293:80" - "9292:9292" diff --git a/integration_tests/v1/conftest.py b/integration_tests/v1/conftest.py index 2a785181..beae02d4 100644 --- a/integration_tests/v1/conftest.py +++ b/integration_tests/v1/conftest.py @@ -40,15 +40,13 @@ "method": "GET", }, "online_tool_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa" - "-online-tool/lpas", + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/lpa-online-tool/lpas", "method": "GET", "valid_lpa_online_tool_ids": ["A33718377316"], "invalid_lpa_online_tool_ids": ["banana"], }, "use_an_lpa_endpoint": { - "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use" - "-an-lpa/lpas", + "url": "https://uml-XXXX.dev.lpa.api.opg.service.justice.gov.uk/v1/use-an-lpa/lpas", "method": "GET", "valid_sirius_uids": ["700000000047"], "invalid_sirius_uids": ["9"], diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index bd56a1f9..6534c25e 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -11,6 +11,5 @@ pytest-html==3.1.1 tenacity==6.3.1 validators==0.18.2 yarl==1.6.3 -importlib-metadata +importlib-metadata==4.13.0 opg-sirius-service==2.1.1 -localstack-client==1.39