8000 tests: to pgdata_content() and add_instance() arbitrary cmdline optio… · postgrespro/pg_probackup@1dbc0c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1dbc0c9

Browse files
committed
tests: to pgdata_content() and add_instance() arbitrary cmdline options can now be provided
1 parent 71172fb commit 1dbc0c9

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 9 additions & 6 deletions
< 8000 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -615,16 +615,16 @@ def init_pb(self, backup_dir, old_binary=False):
615615
old_binary=old_binary
616616
)
617617

618-
def add_instance(self, backup_dir, instance, node, old_binary=False):
618+
def add_instance(self, backup_dir, instance, node, old_binary=False, options=[]):
619619

620-
return self.run_pb([
620+
cmd = [
621621
'add-instance',
622622
'--instance={0}'.format(instance),
623623
'-B', backup_dir,
624624
'-D', node.data_dir
625-
],
626-
old_binary=old_binary
627-
)
625+
]
626+
627+
return self.run_pb(cmd + options, old_binary=old_binary)
628628

629629
def del_instance(self, backup_dir, instance, old_binary=False):
630630

@@ -1049,7 +1049,7 @@ def del_test_dir(self, module_name, fname):
10491049
except:
10501050
pass
10511051

1052-
def pgdata_content(self, pgdata, ignore_ptrack=True):
1052+
def pgdata_content(self, pgdata, ignore_ptrack=True, exclude_dirs=None):
10531053
""" return dict with directory content. "
10541054
" TAKE IT AFTER CHECKPOINT or BACKUP"""
10551055
dirs_to_ignore = [
@@ -1062,6 +1062,9 @@ def pgdata_content(self, pgdata, ignore_ptrack=True):
10621062
'backup_label', 'tablespace_map', 'recovery.conf',
10631063
'ptrack_control', 'ptrack_init', 'pg_control'
10641064
]
1065+
1066+
if exclude_dirs:
1067+
dirs_to_ignore = dirs_to_ignore + exclude_dirs
10651068
# suffixes_to_ignore = (
10661069
# '_ptrack'
10671070
# )

0 commit comments

Comments
 (0)
0