Skip to content

Commit

Permalink
update testing readme for tox
Browse files Browse the repository at this point in the history
  • Loading branch information
diginc committed Oct 17, 2017
1 parent 7c85ac8 commit 65f720d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions TESTING.md
Expand Up @@ -8,7 +8,14 @@ Travis-ci auto runs tests during pull requests (PR) but it only has 2 cores and

After you have the prereqs, to get the required pip packages run: `pip install -r requirements.txt`

To run the tests I currently use this `py.test` command: `py.test -vv -n auto`
To run the Dockerfile templating, image build, and tests all in one command just run: `tox`

* `-n auto` enables multi-core running of tests for as many cores as you have.
* `-vv` runs verbosity level 2, which is a lot of lines of output but not too much (level 3)
# Local image names

Docker images built by `tox` or `python Dockerfile.py` are named the same but stripped of the `diginc/` docker repository namespace.

e.g. `pi-hole:debian_amd64` or `pi-hole-multiarch:alpine_aarch64`

You can run the multiarch images on an amd64 development system if you [enable binfmt-support as described in the multiarch image docs](https://hub.docker.com/r/multiarch/alpine/)

`docker run --rm --privileged multiarch/qemu-user-static:register --reset`
3 changes: 2 additions & 1 deletion requirements.txt
@@ -1,6 +1,7 @@
docker-compose
jinja2
pytest
pytest-cov
pytest-xdist
testinfra==1.5.1
jinja2
tox

0 comments on commit 65f720d

Please sign in to comment.