10000 tests: windows support, fix test_incremental_backup_corrupt_full() · postgrespro/pg_probackup@9a632f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a632f0

Browse files
committed
tests: windows support, fix test_incremental_backup_corrupt_full()
1 parent 7b66795 commit 9a632f0

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

tests/backup_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,14 @@ def test_incremental_backup_corrupt_full(self):
195195
repr(self.output), self.cmd))
196196
except ProbackupException as e:
197197
self.assertTrue(
198-
"INFO: Validate backups of the instance 'node'\n" in e.message and
199-
"WARNING: Backup file \"{0}\" is not found\n".format(
198+
"INFO: Validate backups of the instance 'node'" in e.message and
199+
"WARNING: Backup file".format(
200200
file) in e.message and
201-
"WARNING: Backup {0} data files are corrupted\n".format(
201+
"is not found".format(file) in e.message and
202+
"{0}\" is not found".format(file) in e.message and
203+
"WARNING: Backup {0} data files are corrupted".format(
202204
backup_id) in e.message and
203-
"WARNING: Some backups are not valid\n" in e.message,
205+
"WARNING: Some backups are not valid" in e.message,
204206
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
205207
repr(e.message), self.cmd))
206208

tests/helpers/ptrack_helpers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,13 @@ def __init__(self, *args, **kwargs):
252252
print('pg_probackup binary is not found')
253253
exit(1)
254254

255-
os.environ['PATH'] = os.path.dirname(
256-
self.probackup_path) + ':' + os.environ['PATH']
255+
if os.name == 'posix':
256+
os.environ['PATH'] = os.path.dirname(
257+
self.probackup_path) + ':' + os.environ['PATH']
258+
259+
elif os.name == 'nt':
260+
os.environ['PATH'] = os.path.dirname(
261+
self.probackup_path) + ';' + os.environ['PATH']
257262

258263
self.probackup_old_path = None
259264

0 commit comments

Comments
 (0)
0