From d53c5a55b0fb2b6a20d89bdadcc9bae3e7bc99fc Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 26 Aug 2022 14:58:11 +0200 Subject: [PATCH] Add a test using etcd running basic_replication.feature only, and mark the full tests as flaky. Closes: #1017527 --- debian/changelog | 4 ++++ debian/tests/acceptance | 7 ++++--- debian/tests/control | 18 +++++++++++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0de2d37..8c3e1d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ patroni (2.1.4-2) UNRELEASED; urgency=medium * debian/patches/acceptance_tests_speedup.patch: New patch, reduces loop_wait to 2 thus speeding up the behave tests, taken from upstream commit ead798. + [ Christoph Berg ] + * Add a test using etcd running basic_replication.feature only, and mark the + full tests as flaky. (Closes: #1017527) + -- Debian PostgreSQL Maintainers Thu, 02 Jun 2022 16:59:30 +0200 patroni (2.1.4-1) unstable; urgency=medium diff --git a/debian/tests/acceptance b/debian/tests/acceptance index 733805a..2d9bb92 100755 --- a/debian/tests/acceptance +++ b/debian/tests/acceptance @@ -1,11 +1,12 @@ #!/bin/bash -set -e +set -eu export LC_ALL=C.UTF-8 export LANG=C.UTF-8 export TZ=UTC # suppress UnknownTimeZoneError('Etc/UTC',) DCS=$1 +shift if [ $(id -u) -eq 0 ] then @@ -45,7 +46,7 @@ esac set -x for PG_VERSION in $(ls -1r /usr/lib/postgresql/); do - echo "### PostgreSQL $PG_VERSION acceptance-$DCS ###" + echo "### PostgreSQL $PG_VERSION acceptance-$DCS $@ ###" if [ "${PG_VERSION}" == "10" ]; then SKIP=--tags=-skip else @@ -53,7 +54,7 @@ for PG_VERSION in $(ls -1r /usr/lib/postgresql/); do fi $SU "set -o pipefail; ETCD_UNSUPPORTED_ARCH=$ETCD_ARCH DCS=$DCS \ PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH \ - behave ${SKIP} | ts" || \ + behave ${SKIP} $@ | ts" || \ (for file in $(ls features/output/*_failed/*); do echo "$file:"; cat $file; done && exit 1) echo "### End $PG_VERSION acceptance-$DCS ###" done diff --git a/debian/tests/control b/debian/tests/control index 38523e9..d2f42c4 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,4 +1,16 @@ # etcd +Features: test-name=acceptance-etcd-basic +Depends: + etcd-server, + moreutils, + postgresql, + python3-behave, + python3-coverage, + python3-etcd (>= 0.4.3), + @, +Test-Command: debian/tests/acceptance etcd features/basic_replication.feature +Restrictions: allow-stderr + Features: test-name=acceptance-etcd Depends: etcd-server, @@ -9,7 +21,7 @@ Depends: python3-etcd (>= 0.4.3), @, Test-Command: debian/tests/acceptance etcd -Restrictions: allow-stderr +Restrictions: allow-stderr, flaky # consul Features: test-name=acceptance-consul @@ -22,7 +34,7 @@ Depends: python3-coverage, @, Test-Command: debian/tests/acceptance consul -Restrictions: allow-stderr +Restrictions: allow-stderr, flaky # zookeeper Features: test-name=acceptance-zookeeper @@ -35,7 +47,7 @@ Depends: python3-kazoo, @, Test-Command: debian/tests/acceptance zookeeper -Restrictions: needs-root, allow-stderr, skip-not-installable +Restrictions: needs-root, allow-stderr, flaky, skip-not-installable # regression tests Depends: