Merge ~paelzer/ubuntu/+source/postgresql-common:fix-12.4-tests-focal-1892335 into ubuntu/+source/postgresql-common:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 29e14024be77b34300a026092ccb9737ae6bf5d9
Proposed branch: ~paelzer/ubuntu/+source/postgresql-common:fix-12.4-tests-focal-1892335
Merge into: ubuntu/+source/postgresql-common:ubuntu/focal-devel
Diff against target: 64 lines (+10/-12)
2 files modified
debian/changelog (+7/-0)
t/170_extensions.t (+3/-12)
Reviewer Review Type Date Requested Status
Canonical Server packageset reviewers Pending
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+389706@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

released through -security

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index abaa911..fc20877 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1postgresql-common (214ubuntu0.1) focal; urgency=medium
2
3 [ Christoph Berg ]
4 * t/170_extensions.t: Don't drop plpgsql before testing extensions.
5
6 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 24 Aug 2020 10:41:25 +0200
7
1postgresql-common (214) unstable; urgency=medium8postgresql-common (214) unstable; urgency=medium
29
3 * check_pidfile_running: Read /proc/$pid/cmdline instead of calling /bin/ps.10 * check_pidfile_running: Read /proc/$pid/cmdline instead of calling /bin/ps.
diff --git a/t/170_extensions.t b/t/170_extensions.t
index d8d4dcc..8584416 100644
--- a/t/170_extensions.t
+++ b/t/170_extensions.t
@@ -18,9 +18,8 @@ if ($v < '9.1') {
18# create cluster18# create cluster
19is ((system "pg_createcluster $v main --start >/dev/null"), 0, "pg_createcluster $v main");19is ((system "pg_createcluster $v main --start >/dev/null"), 0, "pg_createcluster $v main");
2020
21# plpgsql is installed by default; remove it to simplify test logic21# plpgsql is installed by default
22is_program_out 'postgres', "psql -qc 'DROP EXTENSION plpgsql'", 0, '';22is_program_out 'postgres', "psql -Atc 'SELECT extname FROM pg_extension'", 0, "plpgsql\n";
23is_program_out 'postgres', "psql -Atc 'SELECT * FROM pg_extension'", 0, '';
2423
25my %depends = (24my %depends = (
26 earthdistance => [qw(cube)],25 earthdistance => [qw(cube)],
@@ -37,23 +36,17 @@ my %depends = (
37 ltree_plpython2u => [qw(ltree plpython2u)],36 ltree_plpython2u => [qw(ltree plpython2u)],
38 ltree_plpython3u => [qw(ltree plpython3u)],37 ltree_plpython3u => [qw(ltree plpython3u)],
39 ltree_plpythonu => [qw(ltree plpythonu)],38 ltree_plpythonu => [qw(ltree plpythonu)],
40 # external extensions that might happen to be installed
41 db2fce => [qw(plpgsql)],
42 pldbgapi => [qw(plpgsql)],
43 unit => [qw(plpgsql)],
44);39);
4540
46foreach (</usr/share/postgresql/$v/extension/*.control>) {41foreach (</usr/share/postgresql/$v/extension/*.control>) {
47 my ($extname) = $_ =~ /^.*\/(.*)\.control$/;42 my ($extname) = $_ =~ /^.*\/(.*)\.control$/;
4843 next if ($extname eq 'plpgsql');
49 my $expected_extensions = "$extname\n";
5044
51 if ($depends{$extname}) {45 if ($depends{$extname}) {
52 for my $dep (@{$depends{$extname}}) {46 for my $dep (@{$depends{$extname}}) {
53 is_program_out 'postgres', "psql -qc 'CREATE EXTENSION $dep'", 0, '',47 is_program_out 'postgres', "psql -qc 'CREATE EXTENSION $dep'", 0, '',
54 "$extname dependency $dep installs without error";48 "$extname dependency $dep installs without error";
55 }49 }
56 $expected_extensions = join ("\n", sort ($extname, @{$depends{$extname}})) . "\n";
57 }50 }
5851
59 if ($extname eq 'hstore' && $v eq '9.1') {52 if ($extname eq 'hstore' && $v eq '9.1') {
@@ -71,8 +64,6 @@ foreach (</usr/share/postgresql/$v/extension/*.control>) {
71 "extension $extname installs without error";64 "extension $extname installs without error";
72 }65 }
7366
74 is_program_out 'postgres', "psql -Atc 'SELECT extname FROM pg_extension ORDER BY extname'", 0,
75 $expected_extensions, "$extname is in pg_extension";
76 is_program_out 'postgres', "psql -qc 'DROP EXTENSION \"$extname\"'", 0, '',67 is_program_out 'postgres', "psql -qc 'DROP EXTENSION \"$extname\"'", 0, '',
77 "extension $extname removes without error";68 "extension $extname removes without error";
7869

Subscribers

People subscribed via source and target branches