diff --git a/test/.env.test b/test/.env.test.sample similarity index 94% rename from test/.env.test rename to test/.env.test.sample index faf865764..515d419d0 100644 --- a/test/.env.test +++ b/test/.env.test.sample @@ -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 @@ -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 diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 000000000..ed9875073 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1 @@ +.env.test diff --git a/test/README.md b/test/README.md index cbcce1eb5..d551a4f18 100644 --- a/test/README.md +++ b/test/README.md @@ -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 ```