From d1d4bf1b0c0cd91b88b19cfe74cd749293ba08ad Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Wed, 30 Jan 2019 12:57:32 +0100 Subject: [PATCH] * debian/tests/control: Use `Test-Command' directive with relative path instead of `Tests' and pass it the DCS as argument. * debian/tests/acceptance: Set DCS variable as provided by the command-line argument. --- debian/changelog | 4 ++++ debian/tests/acceptance | 8 +------- debian/tests/control | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index f925433..80f75dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,10 @@ patroni (1.5.4-5) UNRELEASED; urgency=medium [ Michael Banck ] * debian/config.yml.in: Set postgresql.pgpass option and add a commented-out pg_hba line for md5 connections from the local network. + * debian/tests/control: Use `Test-Command' directive with relative path + instead of `Tests' and pass it the DCS as argument. + * debian/tests/acceptance: Set DCS variable as provided by the command-line + argument. -- Debian PostgreSQL Maintainers Tue, 29 Jan 2019 11:22:38 +0100 diff --git a/debian/tests/acceptance b/debian/tests/acceptance index f7d9a9a..4d7d643 100755 --- a/debian/tests/acceptance +++ b/debian/tests/acceptance @@ -5,7 +5,7 @@ set -e export LC_ALL=C.UTF-8 export LANG=C.UTF-8 export TZ=UTC # suppress UnknownTimeZoneError('Etc/UTC',) -DCS=etcd +DCS=$1 if [ $(id -u) -eq 0 ] then @@ -19,7 +19,6 @@ then # JAVA_OPTS need to be set, otherwise zookeeper is not reachable via IPV4 sed -i -e 's/#JAVA_OPTS=""/JAVA_OPTS="-Djava.net.preferIPv4Stack=true"/' /etc/default/zookeeper /etc/init.d/zookeeper start - DCS=zookeeper # let Java have some more time to startup sleep 5 fi @@ -27,11 +26,6 @@ else SU='bash -c' fi -if [ -x /usr/bin/consul ] -then - DCS=consul -fi - # clean up afterwards trap 'rm -f /tmp/pgpass?; if [ $(id -u) -eq 0 ] && [ -x /etc/init.d/zookeeper ]; then /etc/init.d/zookeeper stop; fi' 0 2 3 15 diff --git a/debian/tests/control b/debian/tests/control index 640f2dc..21be8c2 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -9,7 +9,7 @@ Depends: python3-kazoo, python3-kubernetes, @, -Tests: acceptance +Test-Command: debian/tests/acceptance consul Restrictions: allow-stderr # etcd @@ -23,7 +23,7 @@ Depends: python3-kazoo, python3-kubernetes, @, -Tests: acceptance +Test-Command: debian/tests/acceptance etcd Restrictions: allow-stderr # zookeper @@ -37,7 +37,7 @@ Depends: python3-kazoo, python3-kubernetes, @, -Tests: acceptance +Test-Command: debian/tests/acceptance zookeeper Restrictions: needs-root, allow-stderr # regression tests