* debian/tests/acceptance: Update to set locale and to run the tests as user

postgres if autopkgtest is invoked as root.
  * debian/tests/control: Run acceptance test first.
  * debian/rules (override_dh_auto_test): Do not run testsuite during build.
This commit is contained in:
Michael Banck 2017-09-23 09:04:11 +02:00
parent f97d40aff7
commit b2e4df0651
3 changed files with 15 additions and 4 deletions

2
debian/rules vendored
View file

@ -26,4 +26,4 @@ override_dh_installdocs:
dh_sphinxdoc /usr/share/doc/patroni/html
override_dh_auto_test:
python3 setup.py test
# nothing to do here, see debian/tests/* instead

View file

@ -2,8 +2,19 @@
set -e
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
PG_VERSION=$(/usr/share/postgresql-common/supported-versions default)
export PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH
if [ $(id -u) -eq 0 ]
then
# required so that the postgres user can create files
chmod 777 .
chmod 777 features
SU='su postgres -p -c'
else
SU='bash -c'
fi
behave
$SU "export PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH; behave"

View file

@ -1,3 +1,3 @@
Depends: @builddeps@, @, python3-behave, python3-coverage, postgresql, etcd-server
Tests: test, acceptance
Tests: acceptance, test
Restrictions: allow-stderr