Skip to content

Commit 186fb72

Browse files
committed
tests: minor fixes
1 parent 7ddf8ee commit 186fb72

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/restore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ restore_files(void *arg)
12121212
}
12131213

12141214
/*
1215-
* Create recovery.conf (probackup_recovery.conf in case of PG12)
1215+
* Create recovery.conf (postgresql.auto.conf in case of PG12)
12161216
* with given recovery target parameters
12171217
*/
12181218
static void

tests/archive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ def test_archive_options(self):
16071607
])
16081608

16091609
if self.get_version(node) >= self.version_to_num('12.0'):
1610-
recovery_conf = os.path.join(node.data_dir, 'probackup_recovery.conf')
1610+
recovery_conf = os.path.join(node.data_dir, 'postgresql.auto.conf')
16111611
else:
16121612
recovery_conf = os.path.join(node.data_dir, 'recovery.conf')
16131613

@@ -1682,7 +1682,7 @@ def test_archive_options_1(self):
16821682
self.restore_node(backup_dir, 'node', node)
16831683

16841684
if self.get_version(node) >= self.version_to_num('12.0'):
1685-
recovery_conf = os.path.join(node.data_dir, 'probackup_recovery.conf')
1685+
recovery_conf = os.path.join(node.data_dir, 'postgresql.auto.conf')
16861686
else:
16871687
recovery_conf = os.path.join(node.data_dir, 'recovery.conf')
16881688

@@ -2096,7 +2096,7 @@ def test_multi_timeline_recovery_prefetching(self):
20962096

20972097
if node.major_version >= 12:
20982098
node.append_conf(
2099-
'probackup_recovery.conf', "restore_command = '{0}'".format(restore_command))
2099+
'postgresql.auto.conf', "restore_command = '{0}'".format(restore_command))
21002100
else:
21012101
node.append_conf(
21022102
'recovery.conf', "restore_command = '{0}'".format(restore_command))

tests/compatibility.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def test_backward_compatibility_merge_1(self):
675675
# check that in-place is disabled
676676
self.assertIn(
677677
"WARNING: In-place merge is disabled "
678-
"because of program versions mismatch", output)
678+
"because of storage format incompatibility", output)
679679

680680
# restore merged backup
681681
node_restored = self.make_simple_node(
@@ -1077,7 +1077,7 @@ def test_backward_compatibility_merge_5(self):
10771077
# check that in-place is disabled
10781078
self.assertNotIn(
10791079
"WARNING: In-place merge is disabled "
1080-
"because of program versions mismatch", output)
1080+
"because of storage format incompatibility", output)
10811081

10821082
# restore merged backup
10831083
node_restored = self.make_simple_node(

tests/helpers/ptrack_helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,10 +1326,6 @@ def set_replica(
13261326
f.close()
13271327

13281328
config = 'postgresql.auto.conf'
1329-
probackup_recovery_path = os.path.join(replica.data_dir, 'probackup_recovery.conf')
1330-
if os.path.exists(probackup_recovery_path):
1331-
if os.stat(probackup_recovery_path).st_size > 0:
1332-
config = 'probackup_recovery.conf'
13331329

13341330
if not log_shipping:
13351331
self.set_auto_conf(
@@ -1547,6 +1543,7 @@ def pgdata_content(self, pgdata, ignore_ptrack=True, exclude_dirs=None):
15471543
directory_dict['files'][file_relpath] = {'is_datafile': False}
15481544
with open(file_fullpath, 'rb') as f:
15491545
directory_dict['files'][file_relpath]['md5'] = hashlib.md5(f.read()).hexdigest()
1546+
f.close()
15501547
# directory_dict['files'][file_relpath]['md5'] = hashlib.md5(
15511548
# f = open(file_fullpath, 'rb').read()).hexdigest()
15521549

0 commit comments

Comments
 (0)