Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7972cf7

Browse files
committed
Fixes if tests/archive.py for passing tests on Windows
1 parent4194d7e commit7972cf7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎tests/archive.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,8 +1845,15 @@ def test_undefined_wal_file_path(self):
18451845
self.init_pb(backup_dir)
18461846
self.add_instance(backup_dir,'node',node)
18471847
self.set_archiving(backup_dir,'node',node)
1848-
archive_command='\"{0}\" archive-push -B\"{1}\" --instance\"{2}\" --wal-file-name=%f'.format(
1849-
self.probackup_path,backup_dir,'node')
1848+
ifos.name=='posix':
1849+
archive_command='\"{0}\" archive-push -B\"{1}\" --instance\"{2}\" --wal-file-name=%f'.format(
1850+
self.probackup_path,backup_dir,'node')
1851+
elifos.name=='nt':
1852+
archive_command='\"{0}\" archive-push -B\"{1}\" --instance\"{2}\" --wal-file-name=%f'.format(
1853+
self.probackup_path,backup_dir,'node').replace("\\","\\\\")
1854+
else:
1855+
self.assertTrue(False,'Unexpected os family')
1856+
18501857
self.set_auto_conf(
18511858
node,
18521859
{'archive_command':archive_command})
@@ -1892,7 +1899,7 @@ def test_intermediate_archiving(self):
18921899
ifos.name=='posix':
18931900
self.set_archiving(backup_dir,'node',node,custom_archive_command='cp -v %p {0}/%f'.format(wal_dir))
18941901
elifos.name=='nt':
1895-
self.set_archiving(backup_dir,'node',node,custom_archive_command='xcopy /F "%p" "{0}\\%f"'.format(wal_dir.replace("\\","\\\\")))
1902+
self.set_archiving(backup_dir,'node',node,custom_archive_command='copy /Y "%p" "{0}\\\\%f"'.format(wal_dir.replace("\\","\\\\")))
18961903
else:
18971904
self.assertTrue(False,'Unexpected os family')
18981905

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp