Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : hotfix_1203753
---------------------------------------------------------------
commit 7ed2b8de6a1f5a165ed886758305ccabd102400a
Author: Valentin Gologuzov <vgologuz(a)redhat.com>
Date: Fri Mar 20 19:18:26 2015 +0100
[backend][spec] start/stop redis server during package build tests
---------------------------------------------------------------
backend/copr-backend.spec | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/backend/copr-backend.spec b/backend/copr-backend.spec
index 2454078..7f98858 100644
--- a/backend/copr-backend.spec
+++ b/backend/copr-backend.spec
@@ -25,6 +25,7 @@ BuildRequires: python-requests
BuildRequires: python2-devel
BuildRequires: python-copr
BuildRequires: systemd
+BuildRequires: redis
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
BuildRequires: python-argparse
%endif
@@ -159,9 +160,12 @@ cp -a conf/playbooks %{buildroot}%{_pkgdocdir}/
%check
+redis-server --port 7777 &> /dev/null &
+
PYTHONPATH=backend:run:$PYTHONPATH python -B -m pytest \
-s --cov-report term-missing --cov ./backend --cov ./run ./tests/
+kill %1
%pre
getent group copr >/dev/null || groupadd -r copr