diff --git a/debian/tests/control b/debian/tests/control index 6503bc4..a80dad9 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ -Depends: @, make +Depends: @, make, postgresql Tests: regress -Restrictions: allow-stderr +Restrictions: allow-stderr, needs-root diff --git a/debian/tests/regress b/debian/tests/regress index e903a3a..14f155f 100755 --- a/debian/tests/regress +++ b/debian/tests/regress @@ -1,11 +1,30 @@ #!/bin/sh +# test needs root so we have a SSL certificate + set -eux cd test -pg_virtualenv << EOF +pg_virtualenv <<-'EOF' set -eux + + # force SSL connection + HBA=$(psql -XAtc 'SHOW hba_file') + sed -i -e 's/^host/hostssl/' $HBA + psql -XAtc 'SELECT pg_reload_conf()' + createdb pgloader - psql -d pgloader -c 'create schema expected' - make regress REGRESS=allcols.load PGHOST=::1 + export PGDATABASE=pgloader + psql -XAtc 'create schema expected' + + # test SSL connection + rm -rf /tmp/pgloader + #disabled until cl-plus-ssl is fixed: + #make regress REGRESS=allcols.load PGHOST=localhost + + # test UNIX socket + rm -rf /tmp/pgloader + chmod 777 regress/out + unset PGHOST + su -c 'make regress REGRESS=allcols.load' postgres EOF