Commit 020d95d3 authored by Martin Pitt's avatar Martin Pitt

* t/030_errors.t: Check that an /etc/postgresql/postgresql.conf leftover is

  not regarded as a cluster directory. This reproduces #450565.
parent b2b4ecb1
postgresql-common (82) UNRELEASED; urgency=low
* debian/control: Fix 'commmon' typo. (Closes: #449532)
* t/030_errors.t: Check that an /etc/postgresql/postgresql.conf leftover is
not regarded as a cluster directory. This reproduces #450565.
-- Martin Pitt <mpitt@debian.org> Sat, 10 Nov 2007 19:08:01 -0500
-- Martin Pitt <mpitt@debian.org> Sun, 11 Nov 2007 01:22:24 +0100
postgresql-common (81) unstable; urgency=low
......
......@@ -6,7 +6,7 @@ require File::Temp;
use lib 't';
use TestLib;
use Test::More tests => 131;
use Test::More tests => 132;
use lib '/usr/share/postgresql-common';
use PgCommon;
......@@ -178,6 +178,15 @@ unlink "/etc/postgresql/$version/main/pg_hba.conf";
rename "/etc/postgresql/$version/main/pg_hba.conf.orig",
"/etc/postgresql/$version/main/pg_hba.conf" or die "rename: $!";
# leftover files must not create confusion
open F, '>/etc/postgresql/postgresql.conf';
print F "data_directory = '/nonexisting'\n";
close F;
my @c = get_version_clusters $version;
is_deeply (\@c, ['main'],
'leftover /etc/postgresql/postgresql.conf is not regarded as a cluster');
unlink '/etc/postgresql/postgresql.conf';
# remove cluster and directory
ok ((system "pg_dropcluster $version main") == 0,
'pg_dropcluster');
......
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