Skip to content

Commit

Permalink
Update test documentation (#175)
Browse files Browse the repository at this point in the history
* Format `test/README.md`

* Rename `.env.test` -> `.env.test.sample` and add `INFORMDB_PAT`

* Add `INFORMDB_PAT` requirement to `test/` docs
  • Loading branch information
milanmlft authored Dec 6, 2023
1 parent 4d12bde commit f69aea7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
6 changes: 4 additions & 2 deletions test/.env.test → test/.env.test.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ DEBUG=True
PIXL_DICOM_TRANSFER_TIMEOUT=120
PIXL_QUERY_TIMEOUT=120

INFORMDB_PAT=

# PIXL PostgreSQL instance
PIXL_DB_HOST=postgres
PIXL_DB_PORT=5432
Expand Down Expand Up @@ -45,12 +47,12 @@ ENABLE_DICOM_WEB=true
ORTHANC_AUTOROUTE_ANON_TO_AZURE=false
PIXL_DICOM_TRANSFER_TIMEOUT=240

# UCVNA DICOM node information
# UCVNA DICOM node information
VNA_AE_TITLE=VNA
VNA_DICOM_PORT=4242
VNA_IP_ADDR=vna

# UCVNAQR DICOM node information
# UCVNAQR DICOM node information
VNAQR_AE_TITLE=VNAQR
VNAQR_DICOM_PORT=4242
VNAQR_IP_ADDR=vna-qr
Expand Down
1 change: 1 addition & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env.test
24 changes: 17 additions & 7 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
# PIXL System Tests

This directory contains a system/integration test that runs locally and aims to
test the essential functionality of the full PIXL system.
**Given** a DICOM image in an Orthanc instance (mocked vendor
neutral archive, VNA) and a single patient with the same identifier in a
This directory contains a system/integration test that runs locally and aims to
test the essential functionality of the full PIXL system.

**Given** a DICOM image in an Orthanc instance (mocked vendor
neutral archive, VNA) and a single patient with the same identifier in a
postgres instance (mocked EMAP database, star schema).
**When** a message containing the patient and study identifier is added to the
**When** a message containing the patient and study identifier is added to the
queue and the consumers started.
**Then** a row in the "anon" EMAP data instance of the PIXL postgres instance exists
and the DICOM study exists in the "anon" PIXL Orthanc instance.

Run with
Spinning up the Docker containers requires the `$INFORMDB_PAT` environment variable to be set to a
valid [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
with read access to the [UCLH-Foundry/Inform-DB](https://github.com/UCLH-Foundry/Inform-DB) repo.

1. Create a [fine-grained Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
with **read** access to the *UCLH-Foundry/Inform-DB* repo
2. Create `.env.test` with `cp .env.test.sample .env.test`
3. Add your `githb_pat***` token to `.env.test` as `INFORMDB_PAT=***`

Then, run the system test with:

```bash
./run-system-test.sh
```

0 comments on commit f69aea7

Please sign in to comment.