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
1diff --git a/debian/changelog b/debian/changelog
2index abaa911..fc20877 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+postgresql-common (214ubuntu0.1) focal; urgency=medium
7+
8+ [ Christoph Berg ]
9+ * t/170_extensions.t: Don't drop plpgsql before testing extensions.
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 24 Aug 2020 10:41:25 +0200
12+
13 postgresql-common (214) unstable; urgency=medium
14
15 * check_pidfile_running: Read /proc/$pid/cmdline instead of calling /bin/ps.
16diff --git a/t/170_extensions.t b/t/170_extensions.t
17index d8d4dcc..8584416 100644
18--- a/t/170_extensions.t
19+++ b/t/170_extensions.t
20@@ -18,9 +18,8 @@ if ($v < '9.1') {
21 # create cluster
22 is ((system "pg_createcluster $v main --start >/dev/null"), 0, "pg_createcluster $v main");
23
24-# plpgsql is installed by default; remove it to simplify test logic
25-is_program_out 'postgres', "psql -qc 'DROP EXTENSION plpgsql'", 0, '';
26-is_program_out 'postgres', "psql -Atc 'SELECT * FROM pg_extension'", 0, '';
27+# plpgsql is installed by default
28+is_program_out 'postgres', "psql -Atc 'SELECT extname FROM pg_extension'", 0, "plpgsql\n";
29
30 my %depends = (
31 earthdistance => [qw(cube)],
32@@ -37,23 +36,17 @@ my %depends = (
33 ltree_plpython2u => [qw(ltree plpython2u)],
34 ltree_plpython3u => [qw(ltree plpython3u)],
35 ltree_plpythonu => [qw(ltree plpythonu)],
36- # external extensions that might happen to be installed
37- db2fce => [qw(plpgsql)],
38- pldbgapi => [qw(plpgsql)],
39- unit => [qw(plpgsql)],
40 );
41
42 foreach (</usr/share/postgresql/$v/extension/*.control>) {
43 my ($extname) = $_ =~ /^.*\/(.*)\.control$/;
44-
45- my $expected_extensions = "$extname\n";
46+ next if ($extname eq 'plpgsql');
47
48 if ($depends{$extname}) {
49 for my $dep (@{$depends{$extname}}) {
50 is_program_out 'postgres', "psql -qc 'CREATE EXTENSION $dep'", 0, '',
51 "$extname dependency $dep installs without error";
52 }
53- $expected_extensions = join ("\n", sort ($extname, @{$depends{$extname}})) . "\n";
54 }
55
56 if ($extname eq 'hstore' && $v eq '9.1') {
57@@ -71,8 +64,6 @@ foreach (</usr/share/postgresql/$v/extension/*.control>) {
58 "extension $extname installs without error";
59 }
60
61- is_program_out 'postgres', "psql -Atc 'SELECT extname FROM pg_extension ORDER BY extname'", 0,
62- $expected_extensions, "$extname is in pg_extension";
63 is_program_out 'postgres', "psql -qc 'DROP EXTENSION \"$extname\"'", 0, '',
64 "extension $extname removes without error";
65

Subscribers

People subscribed via source and target branches