* 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:
parent
f97d40aff7
commit
b2e4df0651
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -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
|
||||
|
|
15
debian/tests/acceptance
vendored
15
debian/tests/acceptance
vendored
|
@ -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"
|
||||
|
|
2
debian/tests/control
vendored
2
debian/tests/control
vendored
|
@ -1,3 +1,3 @@
|
|||
Depends: @builddeps@, @, python3-behave, python3-coverage, postgresql, etcd-server
|
||||
Tests: test, acceptance
|
||||
Tests: acceptance, test
|
||||
Restrictions: allow-stderr
|
||||
|
|
Loading…
Reference in a new issue