Skip to content

Running unit tests

Milton Pividori edited this page Aug 12, 2019 · 7 revisions

Table of Contents

Refer to the installation instructions before trying to run the unit tests.

Run PostgreSQL locally using Docker

Once in the root directory of ukbREST, first of all, run your Docker and then this command:

$ sudo bash utils/scripts/run_postgresql.sh

That command will pull the PostgreSQL docker image and run the PostgreSQL server locally. You need to open a new terminal for then next steps.

Optional dependencies

You need to install bgenix and qctool if you want to run the tests for genotype query. The bgenix and qctool commands need to be visible in the path.

Run unit tests

You need to have a Conda environment (assumed to be named ukbrest here).

$ conda activate ukbrest
$ python -m unittest discover .
[...]
----------------------------------------------------------------------
Ran 145 tests in 83.173s

OK (skipped=10)