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

Commit0c0eefc

Browse files
committed
tests: fix compatibility tests for remote backup
1 parentc94b182 commit0c0eefc

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

‎tests/helpers/ptrack_helpers.py‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ def init_pb(self, backup_dir, options=[], old_binary=False):
636636

637637
shutil.rmtree(backup_dir,ignore_errors=True)
638638

639-
ifself.remote:
639+
# don`t forget to kill old_binary after remote ssh release
640+
ifself.remoteandnotold_binary:
640641
options=options+ [
641642
'--remote-proto=ssh',
642643
'--remote-host=localhost']
@@ -657,7 +658,8 @@ def add_instance(self, backup_dir, instance, node, old_binary=False, options=[])
657658
'-D',node.data_dir
658659
]
659660

660-
ifself.remote:
661+
# don`t forget to kill old_binary after remote ssh release
662+
ifself.remoteandnotold_binary:
661663
options=options+ [
662664
'--remote-proto=ssh',
663665
'--remote-host=localhost']
@@ -710,7 +712,9 @@ def backup_node(
710712
'-d','postgres',
711713
'--instance={0}'.format(instance)
712714
]
713-
ifself.remote:
715+
716+
# don`t forget to kill old_binary after remote ssh release
717+
ifself.remoteandnotold_binary:
714718
options=options+ [
715719
'--remote-proto=ssh',
716720
'--remote-host=localhost']
@@ -736,6 +740,7 @@ def restore_node(
736740
self,backup_dir,instance,node=False,
737741
data_dir=None,backup_id=None,old_binary=False,options=[]
738742
):
743+
739744
ifdata_dirisNone:
740745
data_dir=node.data_dir
741746

@@ -745,7 +750,9 @@ def restore_node(
745750
'-D',data_dir,
746751
'--instance={0}'.format(instance)
747752
]
748-
ifself.remote:
753+
754+
# don`t forget to kill old_binary after remote ssh release
755+
ifself.remoteandnotold_binary:
749756
options=options+ [
750757
'--remote-proto=ssh',
751758
'--remote-host=localhost']
@@ -943,8 +950,9 @@ def set_archiving(
943950
backup_dir.replace("\\","\\\\"),
944951
instance)
945952

946-
# if self.remote:
947-
# archive_command = archive_command + '--remote-proto=ssh --remote-host=localhost '
953+
# don`t forget to kill old_binary after remote ssh release
954+
ifself.remoteandnotold_binary:
955+
archive_command=archive_command+'--remote-proto=ssh --remote-host=localhost '
948956

949957
ifself.archive_compressorcompress:
950958
archive_command=archive_command+'--compress '
@@ -1062,6 +1070,8 @@ def switch_wal_segment(self, node):
10621070
else:
10631071
node.execute('select pg_switch_xlog()')
10641072

1073+
sleep(1)
1074+
10651075
defwait_until_replica_catch_with_master(self,master,replica):
10661076

10671077
ifself.version_to_num(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp