mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
debian/tests: Depend on postgresql, and run test as root
Prepare to test SSL connections, but do not exercise the test yet, cl-plus-ssl is still broken.
This commit is contained in:
parent
7d8ac3b352
commit
20e5b0bf2a
4
debian/tests/control
vendored
4
debian/tests/control
vendored
@ -1,3 +1,3 @@
|
||||
Depends: @, make
|
||||
Depends: @, make, postgresql
|
||||
Tests: regress
|
||||
Restrictions: allow-stderr
|
||||
Restrictions: allow-stderr, needs-root
|
||||
|
||||
25
debian/tests/regress
vendored
25
debian/tests/regress
vendored
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user