From 644c4430f887f5d52cb2fc719b60fdca99739392 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 17 Mar 2022 10:04:51 +0300 Subject: Document how to run tests Add documentation on how to run the tests - this was no clear from the existing documentation up to this point. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 50fe49f6..7fde7fc2 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,20 @@ asserts sprinkled in the code base. Right now, the only tests running in CI are unittests. Please make sure the existing unittests are green when submitting a PR. +From the root directory of the repository, you can run the tests with something +like: + +```sh +env GN_PROFILE=~/opt/gn-latest SERVER_PORT=5300 \ + SQL_URI= \ + ./bin/genenetwork2 ./etc/default_settings.py \ + -m unittest -v +``` + +In the case where you use the default `etc/default_settings.py` configuration file, you can override any setting as demonstrated with the `SQL_URI` setting in the command above. + +In order to avoid having to set up a whole host of settings every time with the `env` command, you could copy the `etc/default_settings.py` file to a new location (outside the repository is best), and pass that to `bin/genenetwork2` instead. + See [./bin/genenetwork2](https://github.com/genenetwork/genenetwork2/blob/testing/doc/docker-container.org) for more details. -- cgit v1.2.3