Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit 7de9b9f

Browse files
author
Alexander Lakhin
committed
Merge branch 'master' into 'master'
Update the check for pg_controldata output in test_full_install See merge request automation/pg-tests!1361
2 parents 6e81ed5 + 728aaf1 commit 7de9b9f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests_install/test_full_install.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def test_full_install(self, request):
316316
assert ppedition == 'standard'
317317
print('pgpro_source_id:',
318318
pginst.exec_psql_select("SELECT pgpro_build()"))
319-
if version not in ["9.6", "10", "13"]:
319+
if version not in ["9.6", "10"]:
320320
pginst.env = {}
321321
for var in os.environ:
322322
pginst.env[var] = str(os.environ[var])
@@ -326,12 +326,18 @@ def test_full_install(self, request):
326326
'"%s"' % pginst.get_datadir()
327327
).split('\n')
328328
if name == 'postgrespro' and not (edition in ['1c', 'sql']):
329-
assert cdout[0].startswith('pg_control edition:')
330-
cdedition = cdout[0].replace('pg_control edition:', '').strip()
329+
if cdout[0].startswith('pg_control edition:'):
330+
el = 0
331+
elif cdout[1].startswith('pg_control edition:'):
332+
el = 1
333+
else:
334+
raise Exception('pg_control edition is not found'
335+
' in pg_controldata output')
336+
cdedn = cdout[el].replace('pg_control edition:', '').strip()
331337
if edition == 'ent':
332-
assert cdedition == 'Postgres Pro Enterprise'
338+
assert cdedn == 'Postgres Pro Enterprise'
333339
elif edition == 'std':
334-
assert cdedition == 'Postgres Pro Standard'
340+
assert cdedn == 'Postgres Pro Standard'
335341
print("OK")
336342

337343
def test_mamonsu(self, request):

0 commit comments

Comments
 (0)