Skip to content

Commit 44d4bec

Browse files
add information on how to run tests
1 parent b8aade6 commit 44d4bec

20 files changed

Lines changed: 258 additions & 163 deletions

File tree

.env.template

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
GITHUB_TOKEN=
33

44
# Apigee proxy name to be used for test execution
5-
# nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
5+
# nhs-notify-supplier--internal-dev--nhs-notify-supplier-prxxx
66
PROXY_NAME=
77

88
# APIM env to run e2e tests against, other options are: ref, int, prod
@@ -25,17 +25,30 @@ TARGET_ENVIRONMENT=prxx
2525
# API Keys
2626
# ========
2727
# In order to find out the value of an environments given API key, follow these steps
28-
# 1. Log in to Non-Prod
29-
# 2. Navigate to 'Publish' > 'Apps' and search for the app linked to authentication
30-
# 3. Copy the "key" from the Credentials related to the app
28+
# 1. Log in to the AWS NHS Notify Suppliers Dev account
29+
# 2. Open the paramenter store and search for the parameter /dev/e2e/keys/apim/pr
30+
# 3. Copy the decrypted "value"
3131
# Note: For INT and higher environments use developer portal https://identity.prod.api.platform.nhs.uk/
3232
export NON_PROD_API_KEY=xxx
3333
export INTEGRATION_API_KEY=xxx
3434
export PRODUCTION_API_KEY=xxx
35+
36+
# Status Endpoint API Key
37+
# In order to find the value of the status endpoint API key, follow these steps:
38+
# 1. Log in to the AWS NHS Notify Suppliers Dev account
39+
# 2. Open the paramenter store and search for the parameter /dev/e2e/keys/apim/status
40+
# 3. Copy the decrypted "value"
3541
export STATUS_ENDPOINT_API_KEY=xxx
3642

3743
# Private Keys
3844
# ============
45+
# In order to set the NON_PROD_PRIVATE_KEY, follow these steps:
46+
# 1. Log in to the AWS NHS Notify Suppliers Dev account
47+
# 2. Open the paramenter store and search for the parameter /dev/e2e/keys/private
48+
# 3. Copy the decrypted "value"
49+
# 4. Create a .pem file and paste the value copied in step 3,
50+
# save the file and provide the path to the file as the value for NON_PROD_PRIVATE_KEY
51+
# for example /workspaces/nhs-notify-supplier-api/scripts/JWT/internal-dev-test-1.pem
3952
# private key path used to generate authentication for tests ran against the internal-dev and internal-qa
4053
export NON_PROD_PRIVATE_KEY=xxx
4154
# private key path used to generate authentication for tests ran against the int environment

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ version.json
1313
# Please, add your custom content below!
1414
.idea
1515
.env
16+
.devcontainer/devcontainer-lock.json
1617

1718
# dependencies
1819
node_modules

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## Contributing to NHS Notify Supplier API
1+
<!-- vale off -->
2+
3+
# Contributing to NHS Notify Supplier API
24

35
## Feature Branches
46

@@ -51,3 +53,5 @@ You can test your branch in a dynamic environment prior to merging to `main`. Th
5153
Each Lambda and internal package has a `README.md` alongside the source describing its purpose, flow, integration points, and peculiarities. These are bundled into the docs site via `docs/generate-includes.sh`.
5254

5355
When making changes to a Lambda or internal package, check whether the corresponding README needs updating. Function documentation is not auto-generated and can become stale if not maintained alongside code changes.
56+
57+
<!-- vale on -->

config/suppliers/README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- vale off -->
2+
13
# Supplier Configuration
24

35
## Purpose
@@ -6,14 +8,14 @@ Static JSON configuration files that define the supplier allocation rules for th
68

79
## Configuration Entities
810

9-
| Entity | Directory | Description |
10-
| --- | --- | --- |
11-
| **Supplier** | `supplier/` | Print supplier definitions with ID, name, channel type, daily capacity, and status (PROD/DRAFT) |
12-
| **Letter Variant** | `letter-variant/` | Letter type definitions with physical constraints (sheets, sides, ink coverage, delivery days), associated pack specification IDs, and volume group assignment |
13-
| **Volume Group** | `volume-group/` | Groupings of letter variants for allocation purposes, with status and date range validity |
14-
| **Supplier Allocation** | `supplier-allocation/` | Maps a supplier to a volume group with a target `allocationPercentage` and status |
15-
| **Pack Specification** | `pack-specification/` | Detailed print assembly specs (paper, envelope, print colour, duplex) with constraints and billing ID |
16-
| **Supplier Pack** | `supplier-pack/` | Links a supplier to a pack specification with approval status |
11+
| Entity | Directory | Description |
12+
| ----------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13+
| **Supplier** | `supplier/` | Print supplier definitions with ID, name, channel type, daily capacity, and status (PROD/DRAFT) |
14+
| **Letter Variant** | `letter-variant/` | Letter type definitions with physical constraints (sheets, sides, ink coverage, delivery days), associated pack specification IDs, and volume group assignment |
15+
| **Volume Group** | `volume-group/` | Groupings of letter variants for allocation purposes, with status and date range validity |
16+
| **Supplier Allocation** | `supplier-allocation/` | Maps a supplier to a volume group with a target `allocationPercentage` and status |
17+
| **Pack Specification** | `pack-specification/` | Detailed print assembly specs (paper, envelope, print colour, duplex) with constraints and billing ID |
18+
| **Supplier Pack** | `supplier-pack/` | Links a supplier to a pack specification with approval status |
1719

1820
## Allocation Lookup Chain
1921

@@ -33,3 +35,5 @@ When the `supplier-allocator` Lambda processes a `LetterRequestPreparedEvent`:
3335
- `status: "PROD"` is required at multiple levels (supplier, volume group, allocation) for an allocation to be active.
3436
- Volume groups have `startDate` (and optional `endDate`) fields. Allocations are only valid when the current date falls within this range (evaluated in London timezone).
3537
- Supplier `dailyCapacity` is tracked separately in `SUPPLIER_QUOTAS_TABLE` and resets at midnight London time. It is not stored in these config files.
38+
39+
<!-- vale on -->

0 commit comments

Comments
 (0)