From 50aeb2486d7690b351d3c7b2be46964f3ff22791 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Mar 08 2018 13:21:47 +0000 Subject: Add instruction to run the unit test in a container Signed-off-by: Clement Verna --- diff --git a/README.rst b/README.rst index b7767fe..3f227a7 100644 --- a/README.rst +++ b/README.rst @@ -79,6 +79,19 @@ To stop the containers, run the following :: More information about docker-compose cli see https://docs.docker.com/compose/reference/. +* Running the unit-tests + +To run the unit-tests, there is container available with all the dependencies needed. + +Use the following command to build this container :: + + $ docker build -t pagure-test -f dev/docker/test_environment dev/docker + +Once the container is built, you can run the tests as follow :: + + $ docker run -it --rm -v `pwd`:/code:z --workdir /code pagure-test ./runtests.sh + + Manually ^^^^^^^^ diff --git a/dev/docker/test_environment b/dev/docker/test_environment new file mode 100644 index 0000000..f019986 --- /dev/null +++ b/dev/docker/test_environment @@ -0,0 +1,14 @@ +FROM registry.fedoraproject.org/fedora:27 + +RUN dnf install -y python-alembic python-arrow python-binaryornot\ + python-bleach python-blinker python-chardet python-cryptography\ + python-docutils python-enum34 python-flask python2-fedora-flask\ + python-flask-wtf python-flask-multistatic py-bcrypt python-jinja2\ + python-markdown python-munch python-openid-cla python-openid-teams\ + python-psutil python-pygit2 python-pygments python2-pillow\ + python-sqlalchemy python-straight-plugin python-wtforms python-nose\ + python-coverage python-mock python-mock python-eventlet python2-flask-oidc\ + python-nose python-flake8 sudo tmux redis vim git &&\ + pip install celery redis trollius + +ENV LC_ALL=C.UTF-8 LANG=C.UTF-8