Skip to content

Commit 3a519d3

Browse files
committed
Remove some README stuff
1 parent db73dbe commit 3a519d3

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,13 @@ There are four types of `pytest` in this project:
203203
- Unit: these _do not have_ any `@pytest.mark` markers;
204204
- Integration: these have `@pytest.mark.integration` markers;
205205
- Smoke: these have `@pytest.mark.smoke` markers;
206-
- Matrix: these have `@pytest.mark.matrix` markers;
207206

208207
In order to run these you can do one of::
209208

210209
```shell
211210
make test--unit
212211
make test--integration # Will attempt to log you into AWS first
213212
make test--smoke # Will attempt to log you into AWS first
214-
make test--sds--matrix
215213
```
216214

217215
If you would like to rerun all failed tests, you can append `--rerun` to the test command, e.g.:
@@ -230,7 +228,6 @@ Otherwise, feel free to run `pytest` from your `poetry` shell for more fine-grai
230228

231229
The VSCode settings for "Run and Debug" are also set up to run these tests if your prefer.
232230

233-
`make test--sds--matrix` is used for testing responses match in SDS FHIR between CPM and LDAP. You must provide `SDS_PROD_APIKEY` and `SDS_DEV_APIKEY`. There are 3 optional variables `USE_CPM_PROD`, defaults to `FALSE`, `COMPARISON_ENV`, defaults to `local` and `TEST_COUNT`, defaults to `10` and is the number of requests to make.
234231
Add `PYTEST_FLAGS='-sv'`.
235232

236233
### End-to-End feature tests
@@ -296,25 +293,17 @@ TBC
296293

297294
#### Write-integrity (primary keys)
298295

299-
The Partition Key (`pk`) that we use for all objects\* in the database is a unique combination of prefix (aligned with the object type, e.g. `D#` for `Device`) and identifier (generally a UUID). The Sort Key (`sk`) that we use is always exactly equal to the Partition Key. This is opposed to having fully denormalised objects so that attributes are nested under their own `sk`. The reason for doing this is to limit multiple read operations for a given object, and also save I/O in our ETL process by reducing the number of database transactions required per object.
296+
The Partition Key (`pk`) that we use for all objects\* in the database is a unique combination of prefix (aligned with the object type, e.g. `PT#` for `ProductTeam`) and identifier (generally a UUID). The Sort Key (`sk`) that we use is the id of the entity itself.
300297

301-
Objects can additionally be indexed by any keys (see [Domain models](#domain-models)) that they have. For every key in an domain object,
298+
Product Teams can additionally be indexed by any keys (see [Domain models](#domain-models)) that they have. For every key in an domain object,
302299
a copy is made in the database with the index being that key, rather
303300
than the object's identifier. Such copies are referred to as non-root
304301
objects, whereas the "original" (indexed by identifier) is referred to
305302
as the root object.
306303

307-
\* In the case of `Device` tags, which sit outside of the standard database model, `pk` is equal to a query string and `sk` is equal to `pk` of the object that is referred to. A tag-indexed `Device` is otherwise a copy of the root `Device`.
308-
309304
#### Read/search interface
310305

311-
We have implemented a Global Secondary Index (GSI) for attributes named `pk_read` and `sk_read`. The pattern that is place is as follows:
312-
313-
- `pk_read`: A concatenation of parent `pk` values (joined with `#`, e.g. `PT#<product_team_id>#P<product_id>`)
314-
- `sk_read`: Equal to the `pk` of the object itself.
315-
316-
We refer to this as an "ownership" model, as it allows for reads to be
317-
executed in a way that mirrors the API read operations (GET `grandparent/parent/child`), whilst also giving us the ability to return all objects owned by the object indicated in the `pk_read` - which is a common operation for us.
306+
We have implemented 2 Global Secondary Indexes (GSI) for attributes named `pk_read_1`, `sk_read_1`, `pk_read_2` and `sk_read_2`. The pattern that is place is as follows:
318307

319308
A `read` and `search` is available on all `Repository` patterns (almost) for free (the base `_read` and `_search` require a shallow wrapper, but most of the work is done for you).
320309

scripts/test/test.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,3 @@ test--feature--local: _behave ## Run local feature (gherkin) tests
4040

4141
test--feature--%--auto-retry: ## Autoretry of failed feature (gherkin) tests
4242
$(MAKE) test--feature--$* _INTERNAL_FLAGS="--define='auto_retry=true'"
43-
44-
test--sds--matrix: ## Run end-to-end smoke tests that check data matches betweeen cpm and ldap
45-
SDS_PROD_APIKEY=$(SDS_PROD_APIKEY) SDS_DEV_APIKEY=$(SDS_DEV_APIKEY) USE_CPM_PROD=$(USE_CPM_PROD) TEST_COUNT=$(TEST_COUNT) COMPARISON_ENV=$(COMPARISON_ENV) RUN_SPEEDTEST=$(RUN_SPEEDTEST) poetry run python -m pytest $(PYTEST_FLAGS) -m 'matrix' --ignore=src/layers --ignore=src/etl --ignore=archived_epr $(_CACHE_CLEAR)

src/api/tests/feature_tests/features/deleteProductTeam.failure.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Feature: Delete Product Team - failure scenarios
3434
| keys.0.key_value | FOOBAR |
3535
Given I note the response field "$.id" as "product_team_id"
3636
Given I have already made a "POST" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product" with body:
37-
| path | value |
38-
| name | My Great Product |
37+
| path | value |
38+
| name | My Great CpmProduct |
3939
And I note the response field "$.id" as "product_id"
4040
When I make a "DELETE" request with "default" headers to "ProductTeam/<product_team_id>"
4141
Then I receive a status code "409" with body

0 commit comments

Comments
 (0)