Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a8b45df
[GPCAPIM-254]: Lift and shift of lambda functionality in to a Flask app.
davidhamill1-nhs Jan 14, 2026
73cdf4d
[GPCAPIM-254]: Lambda is no longer being used; move actions away from…
davidhamill1-nhs Jan 14, 2026
4e1ea55
[GPCAPIM-254]: Github not picking up unindented input
davidhamill1-nhs Jan 14, 2026
f89e719
[GPCAPIM-254]: Github not picking up unindented input
davidhamill1-nhs Jan 14, 2026
c321366
[GPCAPIM-254]: Add type hinting
davidhamill1-nhs Jan 14, 2026
bf390d8
[GPCAPIM-254]: Beginning of /patient/$gpc.getstructuredrecord endpoint.
davidhamill1-nhs Jan 15, 2026
4c7beef
[GPCAPIM-254]: Handle logic in request-specific class
davidhamill1-nhs Jan 19, 2026
92485cc
[GPCAPIM-254]: Move to handler class
davidhamill1-nhs Jan 19, 2026
8417c72
[GPCAPIM-254]: Update healthcheck endpoint to return simplier body.
davidhamill1-nhs Jan 20, 2026
8317bb7
[GPCAPIM-254]: Remove the lambda.
davidhamill1-nhs Jan 20, 2026
5e060c5
[GPCAPIM-254]: Clean up github actions.
davidhamill1-nhs Jan 20, 2026
5c5c82c
[GPCAPIM-254]: Clean up.
davidhamill1-nhs Jan 21, 2026
33326b5
[GPCAPIM-254]: Unit tests no loonger exist in the top level.
davidhamill1-nhs Jan 21, 2026
a78aa6b
[GPCAPIM-254]: Correct content-type header.
davidhamill1-nhs Jan 21, 2026
2f4f347
[GPCAPIM-254]: Handle response object, rather than just pass back dict.
davidhamill1-nhs Jan 21, 2026
d6d1018
[GPCAPIM-254]: Correct content-type header for healthcheck.
davidhamill1-nhs Jan 21, 2026
976dd3a
[GPCAPIM-254]: Add error hanlding in app.
davidhamill1-nhs Jan 21, 2026
859e54a
Revert "[GPCAPIM-254]: Force new deployment of ecs task in preview en…
davidhamill1-nhs Jan 21, 2026
cd6e96b
[GPCAPIM-254]: Make it clear which version is deployed in the health …
davidhamill1-nhs Jan 21, 2026
00f676a
[GPCAPIM-254]: Correct module name.
davidhamill1-nhs Jan 21, 2026
170a3cb
[GPCAPIM-254]: Use tech radars preferred alpine and run thorugh non-r…
davidhamill1-nhs Jan 21, 2026
6c0cbf0
[GPCAPIM-254]: APIM handles CSRF through its auth design; We don't ha…
davidhamill1-nhs Jan 22, 2026
0ed1834
[GPCAPIM-254]: Reduce fragility of code by pushing environment variab…
davidhamill1-nhs Jan 22, 2026
e0243b5
[GPCAPIM-254]: Reduce fragility of code by ensuring headers are corre…
davidhamill1-nhs Jan 22, 2026
2c80997
[GPCAPIM-254]: Reduce fragility of code by ensuring NHS number is cor…
davidhamill1-nhs Jan 22, 2026
8e85261
[GPCAPIM-254]: CSRF alert will be disabled in SonarQube; we do not ne…
davidhamill1-nhs Jan 26, 2026
82653af
[GPCAPIM-254]: Mock Request.geT_json() method by return the request_b…
davidhamill1-nhs Jan 26, 2026
34d02bb
[GPCAPIM-254]: Pytest, by default, runs all test_*.py files. Passing …
davidhamill1-nhs Jan 26, 2026
09ff41d
[GPCAPIM-254]: Move print lines in to test covered functions to stop …
davidhamill1-nhs Jan 26, 2026
1b3c02f
[GPCAPIM-254]: Make the behaviour of the payload more explicit.
davidhamill1-nhs Jan 26, 2026
fda4de3
[GPCAPIM-254]: Constants should be UPPERCASE for clarity.
davidhamill1-nhs Jan 26, 2026
d2a2617
[GPCAPIM-254]: No longer SSP-from/SSP-to headers; moving towards ODS-…
davidhamill1-nhs Jan 26, 2026
4fbda56
[GPCAPIM-254]: It's a numbers game.
davidhamill1-nhs Jan 26, 2026
47d4592
[GPCAPIM-254]: Correct name of test.
davidhamill1-nhs Jan 26, 2026
3238cd5
[GPCAPIM-254]: Correct step name.
davidhamill1-nhs Jan 26, 2026
76ee8f2
Change return type to flask response
Vox-Ben Jan 15, 2026
45dce95
Refactor things to make ruff happy
Vox-Ben Jan 16, 2026
9c928d7
Pass the request body & multiple SDS calls
Vox-Ben Jan 19, 2026
323d62a
Mypy happy, tests passing
Vox-Ben Jan 19, 2026
8ad53a6
Tests passing. Maybe got too many tests.
Vox-Ben Jan 20, 2026
700e4b1
Trim some unnecessary unit tests
Vox-Ben Jan 20, 2026
035faad
Sort out docstrings
Vox-Ben Jan 20, 2026
69a8bc2
Add tests for coverage
Vox-Ben Jan 20, 2026
2a0678e
Add tests for coverage
Vox-Ben Jan 20, 2026
57eccc3
Change GP Connect to GP provider
Vox-Ben Jan 20, 2026
3cd5111
Remove redundant parentheses
Vox-Ben Jan 20, 2026
ce8fe94
Fix expected response
Vox-Ben Jan 21, 2026
2c4f962
Address review comments
Vox-Ben Jan 27, 2026
a4d95ab
Integrate with real GpProviderClient
Vox-Ben Jan 27, 2026
89ebb4d
Integrate API handler with controller
Vox-Ben Jan 27, 2026
95adf64
One test passing with updated run signature
Vox-Ben Jan 28, 2026
857ae0e
Tests passing
Vox-Ben Jan 28, 2026
32bb69c
Tidy up todos
Vox-Ben Jan 28, 2026
5e5ec97
Make cleanup more robust
Vox-Ben Jan 28, 2026
0dd24bd
Make mypy happy
Vox-Ben Jan 28, 2026
7bf07be
Merge branch 'main' into feature/GPCAPIM-255_controller_integration_c…
Vox-Ben Jan 28, 2026
6569a2f
Add missing check to ruff and fix code accordingly
Vox-Ben Jan 28, 2026
d6f27f0
Merge branch 'feature/GPCAPIM-255_controller_integration_cherrypick' …
Vox-Ben Jan 28, 2026
7ce8ef3
Remove lifestyle ignore changes
Vox-Ben Jan 29, 2026
591ece4
[GPCAPIM-255]: Update dependency groups and requests version
DWolfsNHS Jan 29, 2026
2f2fa3f
Remove tests that need rewriting
Vox-Ben Jan 29, 2026
a072259
Remove acceptance, contract and schema tests pending rewrite/fix
Vox-Ben Jan 29, 2026
df080ee
Remove handler
Vox-Ben Jan 29, 2026
9bb0e40
Address review comments
Vox-Ben Jan 30, 2026
0a07a6f
Acceptance tests now passing
Vox-Ben Jan 30, 2026
08f860b
Reinstate integration tests
Vox-Ben Feb 1, 2026
2990ac0
Reinstate contract and schema tests
Vox-Ben Feb 1, 2026
3329776
Replace StubResponse with requests.Response
Vox-Ben Feb 2, 2026
d10847f
Schema tests working
Vox-Ben Feb 2, 2026
80dc607
All tests passing, hurray!
Vox-Ben Feb 2, 2026
ee8a5dc
[GPCAPIM-260]-[Steel Thread integration testing]-[RP]
BJSS-russell-pollock Feb 2, 2026
d071db9
v5
BJSS-russell-pollock Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/actions/run-integration-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Run integration tests"
description: "Run integration tests against a provided BASE_URL"

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Python project
uses: ./.github/actions/setup-python-project
with:
python-version: ${{ inputs.python_version }}

- name: Run integration tests script
shell: bash
env:
BASE_URL: ${{ inputs.base_url }}
AWS_REGION: ${{ inputs.aws_region }}
MTLS_SECRET_ID: ${{ inputs.mtls_secret_id }}
PREVIEW_MTLS_CERT: ${{ inputs.preview_mtls_cert }}
PREVIEW_MTLS_KEY: ${{ inputs.preview_mtls_key }}
TEST_COMMAND: ${{ inputs.test_target }}
run: |
# call the inline script so everything is visible in logs
set -euo pipefail

echo "Base URL: $BASE_URL"
# write repo-provided certs if present
if [ -n "${PREVIEW_MTLS_CERT:-}" ] && [ -n "${PREVIEW_MTLS_KEY:-}" ]; then
printf '%s\n' "$PREVIEW_MTLS_CERT" > /tmp/mtls_cert.pem
printf '%s\n' "$PREVIEW_MTLS_KEY" > /tmp/mtls_key.pem
chmod 600 /tmp/mtls_cert.pem /tmp/mtls_key.pem
export MTLS_CERT_FILE=/tmp/mtls_cert.pem
export MTLS_KEY_FILE=/tmp/mtls_key.pem
echo "Wrote mTLS cert/key from inputs"
fi

# If an AWS Secrets Manager secret id is provided, fetch and write cert/key
if [ -n "${MTLS_SECRET_ID:-}" ]; then
echo "Fetching mTLS secret from Secrets Manager: $MTLS_SECRET_ID"
SECRET_JSON=$(aws secretsmanager get-secret-value --secret-id "$MTLS_SECRET_ID" --region "$AWS_REGION" --query SecretString --output text)
echo "$SECRET_JSON" > /tmp/secret.json
CERT=$(jq -r '.cert' /tmp/secret.json)
KEY=$(jq -r '.key' /tmp/secret.json)
printf '%s\n' "$CERT" > /tmp/mtls_cert.pem
printf '%s\n' "$KEY" > /tmp/mtls_key.pem
chmod 600 /tmp/mtls_cert.pem /tmp/mtls_key.pem
export MTLS_CERT_FILE=/tmp/mtls_cert.pem
export MTLS_KEY_FILE=/tmp/mtls_key.pem
echo "Wrote mTLS cert/key from Secrets Manager secret"
fi

if [ -z "${BASE_URL:-}" ]; then
echo "ERROR: BASE_URL input is empty"
exit 2
fi

# Accepts a custom test command, otherwise default to make test-integration
if [ -n "${TEST_COMMAND:-}" ]; then
echo "Running test command: $TEST_TARGET"
eval "$TEST_COMMAND"
else
echo "Running make test-integration"
make test-integration
fi
24 changes: 2 additions & 22 deletions .github/workflows/cicd-1-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,10 @@ jobs:
IDP_AWS_REPORT_UPLOAD_REGION: ${{ secrets.IDP_AWS_REPORT_UPLOAD_REGION }}
IDP_AWS_REPORT_UPLOAD_ROLE_NAME: ${{ secrets.IDP_AWS_REPORT_UPLOAD_ROLE_NAME }}
IDP_AWS_REPORT_UPLOAD_BUCKET_ENDPOINT: ${{ secrets.IDP_AWS_REPORT_UPLOAD_BUCKET_ENDPOINT }}
test-stage: # Recommended maximum execution time is 5 minutes
name: "Test stage"
needs: [metadata, commit-stage]
uses: ./.github/workflows/stage-2-test.yaml
with:
python_version: "${{ needs.metadata.outputs.python_version }}"
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build-stage: # Recommended maximum execution time is 3 minutes
name: "Build stage"
needs: [metadata, test-stage]
needs: [metadata]
uses: ./.github/workflows/stage-3-build.yaml
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
with:
Expand All @@ -104,16 +97,3 @@ jobs:
python_version: "${{ needs.metadata.outputs.python_version }}"
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
version: "${{ needs.metadata.outputs.version }}"
acceptance-stage: # Recommended maximum execution time is 10 minutes
name: "Acceptance stage"
needs: [metadata, build-stage]
uses: ./.github/workflows/stage-4-acceptance.yaml
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
with:
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
python_version: "${{ needs.metadata.outputs.python_version }}"
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
version: "${{ needs.metadata.outputs.version }}"
Loading
Loading