From 670c19c1ec189d5831be4a4c09099036da4635ad Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:02:19 +0200 Subject: Adding debian version 248. Signed-off-by: Daniel Baumann --- debian/tests/control | 19 +++++++++++++++++++ debian/tests/default-psql | 19 +++++++++++++++++++ debian/tests/run-testsuite | 4 ++++ 3 files changed, 42 insertions(+) create mode 100644 debian/tests/control create mode 100755 debian/tests/default-psql create mode 100755 debian/tests/run-testsuite (limited to 'debian/tests') diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..3546c5d --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,19 @@ +Tests: default-psql +Depends: + postgresql, +Restrictions: needs-root + +Tests: run-testsuite +Depends: + build-essential, + debhelper, + fakeroot, + hunspell-en-us, + iproute2, + locales-all, + logrotate, + netcat-openbsd, + perl, + postgresql-all, + procps, +Restrictions: needs-root diff --git a/debian/tests/default-psql b/debian/tests/default-psql new file mode 100755 index 0000000..3392ea4 --- /dev/null +++ b/debian/tests/default-psql @@ -0,0 +1,19 @@ +#!/bin/sh +# autopkgtest to check that installing the "postgresql" metapackage results in +# a working cluster +set -e + +# disabled default cluster creation? +if grep -q '\bcreate_main_cluster\b.*\bfalse\b' /etc/postgresql-common/createcluster.conf; then + echo "SKIP: default cluster creation disabled in createcluster.conf" + exit 0 +fi + +if ! pg_lsclusters | grep -q 'main .* online'; then + echo "No running cluster!" >&2 + pg_lsclusters >&2 +fi + +# check that we can connect to template1 on the default cluster +OUT=$(su - -c 'psql -Atc "select 21*2" template1' postgres) +[ "$OUT" = "42" ] || { echo "$OUT"; exit 1; } diff --git a/debian/tests/run-testsuite b/debian/tests/run-testsuite new file mode 100755 index 0000000..aaa9f8d --- /dev/null +++ b/debian/tests/run-testsuite @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +./testsuite -- cgit v1.2.3