Commit 52788e33 authored by Martin Pitt's avatar Martin Pitt

t/030_errors.t: 8.4 now fails on invalid pg_hba.conf, update

accordingly.
parent b33a34f0
......@@ -17,6 +17,8 @@ postgresql-common (98) UNRELEASED; urgency=low
confused about the dummy one.
- t/020_create_sql_remove.t: Fix parsing of psql -Atl output for new 8.4
format.
- t/030_errors.t: 8.4 now fails on invalid pg_hba.conf, update
accordingly.
- t/050_encodings.t: Stop using pg_controldata for checking cluster
encoding. Just check psql -Atl.
......
......@@ -185,10 +185,18 @@ print F "foo\n";
close F;
chmod 0644, "/etc/postgresql/$version/main/pg_hba.conf" or die "chmod: $!";
like_program_out 'postgres', "pg_ctlcluster $version main start", 0,
qr/WARNING.*connection to the database failed.*pg_hba.conf/is,
'pg_ctlcluster start warns about invalid pg_hba.conf';
is_program_out 'postgres', "pg_ctlcluster $version main stop", 0, '', 'stopping cluster';
if ($version lt '8.4') {
like_program_out 'postgres', "pg_ctlcluster $version main start", 0,
qr/WARNING.*connection to the database failed.*pg_hba.conf/is,
'pg_ctlcluster start warns about invalid pg_hba.conf';
is_program_out 'postgres', "pg_ctlcluster $version main stop", 0, '', 'stopping cluster';
} else {
like_program_out 'postgres', "pg_ctlcluster $version main start", 1,
qr/FATAL.*could not load pg_hba.conf/is,
'pg_ctlcluster start fails on invalid pg_hba.conf';
is_program_out 'postgres', "pg_ctlcluster $version main stop", 2,
"Cluster is not running.\n", 'stopping cluster';
}
# test check for pg_hba.conf with removed passwordless local superuser access
open F, ">/etc/postgresql/$version/main/pg_hba.conf" or die "could not create pg_hba.conf: $!";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment