Testing
These instructions describe some basic functionality tests and the ingestion of a test dataset to ensure your local installation is working properly.
Automatic testing
The easiest way to test your local installation is to run the integration tests.
This requires:
- An activated conda environment
(candig)
showing up on the left of your command line. - Installation of some extra python requirements.
This can be done automatically:
or separately:
Run the tests with:
Manual tests
These tests assume you are on a local deployment with default .env
values. If not, you will need to update some of the values to suit your deployment. Check that you can see the data portal in your browser at http://candig.docker.internal:5080. If not, refer to the instructions in the deployment guide.
Check that you can generate a bearer token for user2 with the following call, substituting usernames, secrets and passwords from env.sh
.
Federation Service Errors
The federation service is required to run most CanDIG operations. It is included with make install-all
, but sometimes glitches. Federation errors look like:
To solve these errors:
-
Ensure
federation
is in the list ofCANDIG_AUTH_MODULES
in.env
(though it is present by default). -
If you already have federation running, restart the container with:
Ingest the synthetic clinical dataset
Synthetic data is ingested as part of the integration tests. By default, this data is deleted after tests are run. If you’d like to keep the data in the platform, ensure the KEEP_TEST_DATA
variable in your .env file is set to true
.
If you would like to ingest the data separately, follow the clinical ingest and genomic ingest instructions using the test files in lib/candig-ingest/candigv2-ingest/tests
, using small_dataset_clinical_ingest.json
for clinical ingest and small_dataset_genomic_ingest.json
for genomic ingest.
You should now see the ingested data in the data portal.