Skip to content

Commit c38480d

Browse files
Point user towards make commands for testing.
1 parent 1bbc28d commit c38480d

3 files changed

Lines changed: 15 additions & 25 deletions

File tree

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ For detailed GP Connect specifications, see [GP Connect specifications for devel
1717
- [Testing](#testing)
1818
- [Design](#design)
1919
- [CI/CD](#cicd)
20-
- [Contributing](#contributing)
2120
- [Licence](#licence)
2221

2322
## Architecture Overview
@@ -107,6 +106,8 @@ cd clinical-data-gateway-api
107106

108107
The project is configured to run inside a [Dev Container](https://containers.dev/) defined in `.devcontainer/devcontainer.json`. When you open the project in VS Code with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed, you will be prompted to reopen in the container. This automatically installs all required libraries and tools.
109108

109+
The dev container sits on the same network, `gateway-local`, as [the `gateway-api` container](infrastructure/README.md#docker-images), if deployed. Docker DNS will resolve <http://gateway-api> to the deployed Gateway API.
110+
110111
> [!NOTE]
111112
> **Certificates:** If additional certificates are needed, add them to `infrastructure/images/build-container/resources/dev-certificates` and set the `INCLUDE_DEV_CERTS` Docker build argument to `true`.
112113
>
@@ -147,10 +148,13 @@ The full API schema is defined in [gateway-api/openapi.yaml](gateway-api/openapi
147148

148149
| Variable | Description |
149150
|---|---|
150-
| `BASE_URL` | Protocol, hostname and port for the running API (e.g. `http://localhost:5000`) |
151+
| `BASE_URL` | Protocol, hostname and port for the running API (e.g. `http://localhost:5000`, or `http://gateway-api:8080` from within the devcontainer) |
151152
| `HOST` | hostname portion of `BASE_URL` |
152153
| `FLASK_HOST` | Host the Flask app binds to |
153154
| `FLASK_PORT` | Port the Flask app listens on |
155+
| `STUB_PDS` | `true`, use the stubs/stubs/pds/stub.py to return stubbed responses for PDS FHIR API; otherwise, not. |
156+
| `STUB_SDS` | `true`, use the stubs/stubs/sds/stub.py to return stubbed responses for SDS FHIR API; otherwise, not. |
157+
| `STUB_PROVIDER` | `true`, use the stubs/stubs/provider/stub.py to return stubbed responses for the provider system; otherwise, not. |
154158

155159
Environment variables also control whether stubs are used in place of the real PDS, SDS, and Provider services during local development.
156160

@@ -171,13 +175,9 @@ For detailed information about each test type, directory layout, and how to run
171175

172176
## Design
173177

174-
### Architecture Diagrams
175-
176-
Architecture diagrams follow the [C4 model](https://c4model.com/) and can be created using [draw.io](https://app.diagrams.net/) or [Mermaid](https://github.com/mermaid-js/mermaid).
177-
178178
### Stubs
179179

180-
The `gateway-api/stubs/` directory contains stub implementations of the external services (PDS, SDS, GP Provider). These are used during local development and testing so that tests can run without connecting to live NHS services. Stubs are activated via environment variables.
180+
The `gateway-api/stubs/` directory contains stub implementations of the external services (PDS, SDS, GP Provider). These are used during local development and testing so that tests can run without connecting to live NHS services. Stubs are activated via [environment variables](#environment-variables).
181181

182182
### Architecture Decision Records
183183

@@ -195,17 +195,6 @@ The project uses GitHub Actions for continuous integration and deployment, organ
195195

196196
For full details on each workflow and composite action, see the [CI/CD documentation](.github/github_actions.md).
197197

198-
## Contributing
199-
200-
Contributions are welcome. To get started:
201-
202-
1. Set up your development environment using the [Dev Container instructions](#dev-container-recommended) above
203-
2. Ensure your commits are **signed** — see the [commit signing guide](https://github.com/NHSDigital/software-engineering-quality-framework/blob/main/practices/guides/commit-signing.md)
204-
3. Run `make githooks-config` to enable pre-commit hooks for secret scanning and formatting checks
205-
4. Open a pull request with a clear description of the change
206-
207-
Design decisions and their rationale are captured as Architecture Decision Records.
208-
209198
## Licence
210199

211200
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. See [LICENCE.md](./LICENCE.md).

gateway-api/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Additionally, code coverage is collected from all test types, merged, and analyz
1616
### Quick Test Commands
1717

1818
```bash
19-
# Run all pytest-based tests (unit, contract, schema, integration, acceptance)
20-
poetry run pytest -v
19+
# From the root directory, run all tests (unit, contract, schema, integration, acceptance)
20+
make test
2121

2222
# Run specific test suites
23-
poetry run pytest tests/acceptance/ # BDD acceptance tests (pytest-bdd)
24-
poetry run pytest tests/contract/ # Contract tests (Pact)
25-
poetry run pytest tests/integration/ # Integration tests
26-
poetry run pytest tests/schema/ # Schema validation tests (Schemathesis)
23+
make test-acceptance # BDD acceptance tests (pytest-bdd)
24+
make test-contract # Contract tests (Pact)
25+
make test-integration # Integration tests
26+
make test-schema # Schema validation tests (Schemathesis)
2727

2828
# Unit tests are co-located with source code under src/
29-
poetry run pytest src/
29+
make test-unit
3030
```
3131

3232
For detailed testing documentation, see the README files in each test directory.

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Dependabot
1818
dotfiles
1919
Dockerfiles?
2020
[Dd]ocstring([s]?)
21+
devcontainer
2122
env
2223
[Gg]itleaks
2324
[Gg]rype

0 commit comments

Comments
 (0)