/usr/share/postgresql-common/t/001_packages.t is in postgresql-common 154ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Check that the necessary packages are installed
use strict;
use lib 't';
use TestLib;
use POSIX qw/setlocale LC_ALL LC_MESSAGES/;
use Test::More tests => 12 + ($#MAJORS+1)*7;
print "Info: PostgreSQL versions installed: @MAJORS\n";
foreach my $v (@MAJORS) {
ok ((deb_installed "postgresql-$v"), "postgresql-$v installed");
ok ((deb_installed "postgresql-plpython-$v"), "postgresql-plpython-$v installed");
if ($v >= '9.1') {
ok ((deb_installed "postgresql-plpython3-$v"), "postgresql-plpython3-$v installed");
} else {
pass "no Python 3 package for version $v";
}
ok ((deb_installed "postgresql-plperl-$v"), "postgresql-plperl-$v installed");
ok ((deb_installed "postgresql-pltcl-$v"), "postgresql-pltcl-$v installed");
ok ((deb_installed "postgresql-server-dev-$v"), "postgresql-server-dev-$v installed");
ok ((deb_installed "postgresql-contrib-$v"), "postgresql-contrib-$v installed");
}
ok ((deb_installed 'libecpg-dev'), 'libecpg-dev installed');
ok ((deb_installed 'logrotate'), 'logrotate installed');
ok ((deb_installed 'procps'), 'procps installed');
ok ((deb_installed 'netcat-openbsd'), 'netcat-openbsd installed');
ok ((deb_installed 'hunspell-en-us'), 'hunspell-en-us installed');
# check installed locales to fail tests early if they are missing
ok ((setlocale(LC_MESSAGES, '') =~ /utf8|UTF-8/), 'system has a default UTF-8 locale');
ok (setlocale (LC_ALL, "ru_RU"), 'locale ru_RU exists');
ok (setlocale (LC_ALL, "ru_RU.UTF-8"), 'locale ru_RU.UTF-8 exists');
my $key_file = '/etc/ssl/private/ssl-cert-snakeoil.key';
my $pem_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem';
ok ((getgrnam('ssl-cert'))[3] =~ /postgres/,
'user postgres in the UNIX group ssl-cert');
ok (-e $key_file, "$key_file exists");
is (exec_as ('postgres', "cat $key_file > /dev/null"), 0, "$key_file is readable for postgres");
ok (-e $pem_file, "$pem_file exists");
# vim: filetype=perl
|