Skip to content

Commit f38c372

Browse files
authored
Merge pull request puppetlabs#1005 from david22swan/MODULES-7479
(MODULES-7479) Update postgresql to support Ubuntu 18.04
2 parents 4a3d7e0 + d08c115 commit f38c372

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"operatingsystem": "Ubuntu",
7272
"operatingsystemrelease": [
7373
"14.04",
74-
"16.04"
74+
"16.04",
75+
"18.04"
7576
]
7677
}
7778
],

spec/acceptance/server/config_entry_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class { 'postgresql::server':
2121
# get postgresql version
2222
apply_manifest("class { 'postgresql::server': }")
2323
result = shell('psql --version')
24-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
24+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
2525

2626
if version >= '9.3'
2727
it 'is expected to run idempotently' do

spec/acceptance/server/grant_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class { 'postgresql::server': }
9494

9595
# postgres version
9696
result = shell('psql --version')
97-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
97+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
9898

9999
if version >= '8.4.0'
100100
apply_manifest(pp_lang, catch_failures: true)
@@ -104,7 +104,7 @@ class { 'postgresql::server': }
104104

105105
it 'is expected to GRANT USAGE ON LANGUAGE plpgsql to ROLE' do
106106
result = shell('psql --version')
107-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
107+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
108108

109109
if version >= '8.4.0'
110110
## Check that the privilege was granted to the user
@@ -121,7 +121,7 @@ class { 'postgresql::server': }
121121

122122
# postgres version
123123
result = shell('psql --version')
124-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
124+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
125125

126126
if version >= '8.4.0'
127127
apply_manifest(pp_onlyif, catch_failures: true)
@@ -179,7 +179,7 @@ class { 'postgresql::server': }
179179
shell('psql --version')
180180
end
181181
let(:version) do
182-
result.stdout.match(%r{\s(\d\.\d)})[1]
182+
result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
183183
end
184184

185185
before(:each) do
@@ -266,7 +266,7 @@ class { 'postgresql::server': }
266266
shell('psql --version')
267267
end
268268
let(:version) do
269-
result.stdout.match(%r{\s(\d\.\d)})[1]
269+
result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
270270
end
271271

272272
before(:each) do
@@ -351,7 +351,7 @@ class { 'postgresql::server': }
351351

352352
# postgres version
353353
result = shell('psql --version')
354-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
354+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
355355

356356
if version >= '9.0'
357357
apply_manifest(pp, catch_failures: true)
@@ -408,7 +408,7 @@ class { 'postgresql::server': }
408408

409409
# postgres version
410410
result = shell('psql --version')
411-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
411+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
412412

413413
if version >= '9.0'
414414
apply_manifest(pp, catch_failures: true)
@@ -438,7 +438,7 @@ class { 'postgresql::server': }
438438
begin
439439
# postgres version
440440
result = shell('psql --version')
441-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
441+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
442442

443443
if version >= '9.0'
444444
pp = pp_create_table + <<-EOS.unindent
@@ -493,7 +493,7 @@ class { 'postgresql::server': }
493493

494494
# postgres version
495495
result = shell('psql --version')
496-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
496+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
497497

498498
if version >= '9.0'
499499
apply_manifest(pp, catch_failures: true)
@@ -529,7 +529,7 @@ class { 'postgresql::server': }
529529
# Test fail's on postgresql versions earlier than 9.1.24
530530
# postgres version
531531
result = shell('psql --version')
532-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
532+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
533533

534534
if version >= '9.1.24'
535535
apply_manifest(pp_setup, catch_failures: true)

spec/acceptance/server/reassign_owned_by_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class { 'postgresql::server': }
106106
begin
107107
# postgres version
108108
result = shell('psql --version')
109-
version = result.stdout.match(%r{\s(\d\.\d)})[1]
109+
version = result.stdout.match(%r{\s(\d{1,2}\.\d)})[1]
110110
if version >= '9.0'
111111

112112
apply_manifest(pp_setup + pp_db_old_owner + pp_setup_objects, catch_failures: true)

0 commit comments

Comments
 (0)