|
|
@@ -1176,6 +1176,9 @@ def test_run_restore_restores_each_data_source():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive('call_hooks_even_if_unconfigured')
|
|
|
flexmock(module.borgmatic.borg.repo_list).should_receive('resolve_archive_name').and_return(
|
|
|
flexmock(),
|
|
|
@@ -1245,6 +1248,9 @@ def test_run_restore_bails_for_non_matching_repository():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive(
|
|
|
'call_hooks_even_if_unconfigured',
|
|
|
).never()
|
|
|
@@ -1274,6 +1280,9 @@ def test_run_restore_restores_data_source_by_falling_back_to_all_name():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive('call_hooks_even_if_unconfigured')
|
|
|
flexmock(module.borgmatic.borg.repo_list).should_receive('resolve_archive_name').and_return(
|
|
|
flexmock(),
|
|
|
@@ -1334,6 +1343,9 @@ def test_run_restore_restores_data_source_configured_with_all_name():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive('call_hooks_even_if_unconfigured')
|
|
|
flexmock(module.borgmatic.borg.repo_list).should_receive('resolve_archive_name').and_return(
|
|
|
flexmock(),
|
|
|
@@ -1416,6 +1428,9 @@ def test_run_restore_skips_missing_data_source():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive('call_hooks_even_if_unconfigured')
|
|
|
flexmock(module.borgmatic.borg.repo_list).should_receive('resolve_archive_name').and_return(
|
|
|
flexmock(),
|
|
|
@@ -1498,6 +1513,9 @@ def test_run_restore_restores_data_sources_from_different_hooks():
|
|
|
flexmock(module.borgmatic.config.paths).should_receive(
|
|
|
'make_runtime_directory_glob',
|
|
|
).replace_with(lambda path: path)
|
|
|
+ flexmock(module.borgmatic.config.paths).should_receive('get_working_directory').and_return(None)
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('collect_patterns').and_return(())
|
|
|
+ flexmock(module.borgmatic.actions.pattern).should_receive('process_patterns').and_return([])
|
|
|
flexmock(module.borgmatic.hooks.dispatch).should_receive('call_hooks_even_if_unconfigured')
|
|
|
flexmock(module.borgmatic.borg.repo_list).should_receive('resolve_archive_name').and_return(
|
|
|
flexmock(),
|