|
@@ -492,7 +492,7 @@ def test_create_archive_calls_borg_with_parameters():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -536,7 +536,7 @@ def test_create_archive_calls_borg_with_environment():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -582,7 +582,56 @@ def test_create_archive_with_patterns_calls_borg_with_patterns_including_convert
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def test_create_archive_with_sources_and_used_config_paths_calls_borg_with_sources_and_config_paths():
|
|
|
|
+ flexmock(module.borgmatic.logger).should_receive('add_custom_log_levels')
|
|
|
|
+ flexmock(module.logging).ANSWER = module.borgmatic.logger.ANSWER
|
|
|
|
+ flexmock(module).should_receive('collect_borgmatic_source_directories').and_return([])
|
|
|
|
+ flexmock(module).should_receive('deduplicate_directories').and_return(
|
|
|
|
+ ('foo', 'bar', '/etc/borgmatic/config.yaml')
|
|
|
|
+ )
|
|
|
|
+ flexmock(module).should_receive('map_directories_to_devices').and_return({})
|
|
|
|
+ flexmock(module).should_receive('expand_directories').with_args([]).and_return(())
|
|
|
|
+ flexmock(module).should_receive('expand_directories').with_args(
|
|
|
|
+ ('foo', 'bar', '/etc/borgmatic/config.yaml')
|
|
|
|
+ ).and_return(('foo', 'bar', '/etc/borgmatic/config.yaml'))
|
|
|
|
+ flexmock(module).should_receive('expand_directories').with_args([]).and_return(())
|
|
|
|
+ flexmock(module).should_receive('pattern_root_directories').and_return([])
|
|
|
|
+ flexmock(module.os.path).should_receive('expanduser').and_raise(TypeError)
|
|
|
|
+ flexmock(module).should_receive('expand_home_directories').and_return(())
|
|
|
|
+ flexmock(module).should_receive('write_pattern_file').and_return(None)
|
|
|
|
+ flexmock(module).should_receive('make_list_filter_flags').and_return('FOO')
|
|
|
|
+ flexmock(module.feature).should_receive('available').and_return(True)
|
|
|
|
+ flexmock(module).should_receive('ensure_files_readable')
|
|
|
|
+ flexmock(module).should_receive('make_pattern_flags').and_return(())
|
|
|
|
+ flexmock(module).should_receive('make_exclude_flags').and_return(())
|
|
|
|
+ flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
|
|
|
|
+ (f'repo::{DEFAULT_ARCHIVE_NAME}',)
|
|
|
|
+ )
|
|
|
|
+ environment = {'BORG_THINGY': 'YUP'}
|
|
|
|
+ flexmock(module.environment).should_receive('make_environment').and_return(environment)
|
|
|
|
+ flexmock(module).should_receive('execute_command').with_args(
|
|
|
|
+ ('borg', 'create') + REPO_ARCHIVE_WITH_PATHS + ('/etc/borgmatic/config.yaml',),
|
|
|
|
+ output_log_level=logging.INFO,
|
|
|
|
+ output_file=None,
|
|
|
|
+ borg_local_path='borg',
|
|
|
|
+ working_directory=None,
|
|
|
|
+ extra_environment=environment,
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ module.create_archive(
|
|
|
|
+ dry_run=False,
|
|
|
|
+ repository_path='repo',
|
|
|
|
+ location_config={
|
|
|
|
+ 'source_directories': ['foo', 'bar'],
|
|
|
|
+ 'repositories': ['repo'],
|
|
|
|
+ },
|
|
|
|
+ storage_config={},
|
|
|
|
+ local_borg_version='1.2.3',
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=['/etc/borgmatic/config.yaml']),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -628,7 +677,7 @@ def test_create_archive_with_exclude_patterns_calls_borg_with_excludes():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -672,7 +721,7 @@ def test_create_archive_with_log_info_calls_borg_with_info_parameter():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -713,7 +762,7 @@ def test_create_archive_with_log_info_and_json_suppresses_most_borg_output():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
json=True,
|
|
json=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -758,7 +807,7 @@ def test_create_archive_with_log_debug_calls_borg_with_debug_parameter():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -799,7 +848,7 @@ def test_create_archive_with_log_debug_and_json_suppresses_most_borg_output():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
json=True,
|
|
json=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -843,7 +892,7 @@ def test_create_archive_with_dry_run_calls_borg_with_dry_run_parameter():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -889,7 +938,7 @@ def test_create_archive_with_stats_and_dry_run_calls_borg_without_stats_paramete
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stats=True,
|
|
stats=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -933,7 +982,7 @@ def test_create_archive_with_checkpoint_interval_calls_borg_with_checkpoint_inte
|
|
},
|
|
},
|
|
storage_config={'checkpoint_interval': 600},
|
|
storage_config={'checkpoint_interval': 600},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -976,7 +1025,7 @@ def test_create_archive_with_checkpoint_volume_calls_borg_with_checkpoint_volume
|
|
},
|
|
},
|
|
storage_config={'checkpoint_volume': 1024},
|
|
storage_config={'checkpoint_volume': 1024},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1019,7 +1068,7 @@ def test_create_archive_with_chunker_params_calls_borg_with_chunker_params_param
|
|
},
|
|
},
|
|
storage_config={'chunker_params': '1,2,3,4'},
|
|
storage_config={'chunker_params': '1,2,3,4'},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1062,7 +1111,7 @@ def test_create_archive_with_compression_calls_borg_with_compression_parameters(
|
|
},
|
|
},
|
|
storage_config={'compression': 'rle'},
|
|
storage_config={'compression': 'rle'},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1111,7 +1160,7 @@ def test_create_archive_with_upload_rate_limit_calls_borg_with_upload_ratelimit_
|
|
},
|
|
},
|
|
storage_config={'upload_rate_limit': 100},
|
|
storage_config={'upload_rate_limit': 100},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1157,7 +1206,7 @@ def test_create_archive_with_working_directory_calls_borg_with_working_directory
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1201,7 +1250,7 @@ def test_create_archive_with_one_file_system_calls_borg_with_one_file_system_par
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1251,7 +1300,7 @@ def test_create_archive_with_numeric_ids_calls_borg_with_numeric_ids_parameter(
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1305,7 +1354,7 @@ def test_create_archive_with_read_special_calls_borg_with_read_special_parameter
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1361,7 +1410,7 @@ def test_create_archive_with_basic_option_calls_borg_with_corresponding_paramete
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1416,7 +1465,7 @@ def test_create_archive_with_atime_option_calls_borg_with_corresponding_paramete
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1471,7 +1520,7 @@ def test_create_archive_with_flags_option_calls_borg_with_corresponding_paramete
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1515,7 +1564,7 @@ def test_create_archive_with_files_cache_calls_borg_with_files_cache_parameters(
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1558,7 +1607,7 @@ def test_create_archive_with_local_path_calls_borg_via_local_path():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
local_path='borg1',
|
|
local_path='borg1',
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1602,7 +1651,7 @@ def test_create_archive_with_remote_path_calls_borg_with_remote_path_parameters(
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
remote_path='borg1',
|
|
remote_path='borg1',
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1646,7 +1695,7 @@ def test_create_archive_with_umask_calls_borg_with_umask_parameters():
|
|
},
|
|
},
|
|
storage_config={'umask': 740},
|
|
storage_config={'umask': 740},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1689,7 +1738,7 @@ def test_create_archive_with_log_json_calls_borg_with_log_json_parameters():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=True),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=True, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1732,7 +1781,7 @@ def test_create_archive_with_lock_wait_calls_borg_with_lock_wait_parameters():
|
|
},
|
|
},
|
|
storage_config={'lock_wait': 5},
|
|
storage_config={'lock_wait': 5},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -1775,7 +1824,7 @@ def test_create_archive_with_stats_calls_borg_with_stats_parameter_and_answer_ou
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stats=True,
|
|
stats=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1819,7 +1868,7 @@ def test_create_archive_with_files_calls_borg_with_list_parameter_and_answer_out
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
list_files=True,
|
|
list_files=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1869,7 +1918,7 @@ def test_create_archive_with_progress_and_log_info_calls_borg_with_progress_para
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
progress=True,
|
|
progress=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1913,7 +1962,7 @@ def test_create_archive_with_progress_calls_borg_with_progress_parameter():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
progress=True,
|
|
progress=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -1974,7 +2023,7 @@ def test_create_archive_with_progress_and_stream_processes_calls_borg_with_progr
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
progress=True,
|
|
progress=True,
|
|
stream_processes=processes,
|
|
stream_processes=processes,
|
|
)
|
|
)
|
|
@@ -2039,7 +2088,7 @@ def test_create_archive_with_stream_processes_ignores_read_special_false_and_log
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stream_processes=processes,
|
|
stream_processes=processes,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -2107,7 +2156,7 @@ def test_create_archive_with_stream_processes_adds_special_files_to_excludes():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stream_processes=processes,
|
|
stream_processes=processes,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -2172,7 +2221,7 @@ def test_create_archive_with_stream_processes_and_read_special_does_not_add_spec
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stream_processes=processes,
|
|
stream_processes=processes,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -2213,7 +2262,7 @@ def test_create_archive_with_json_calls_borg_with_json_parameter():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
json=True,
|
|
json=True,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -2256,7 +2305,7 @@ def test_create_archive_with_stats_and_json_calls_borg_without_stats_parameter()
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
json=True,
|
|
json=True,
|
|
stats=True,
|
|
stats=True,
|
|
)
|
|
)
|
|
@@ -2304,7 +2353,7 @@ def test_create_archive_with_source_directories_glob_expands():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2348,7 +2397,7 @@ def test_create_archive_with_non_matching_source_directories_glob_passes_through
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2391,7 +2440,7 @@ def test_create_archive_with_glob_calls_borg_with_expanded_directories():
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2434,7 +2483,7 @@ def test_create_archive_with_archive_name_format_calls_borg_with_archive_name():
|
|
},
|
|
},
|
|
storage_config={'archive_name_format': 'ARCHIVE_NAME'},
|
|
storage_config={'archive_name_format': 'ARCHIVE_NAME'},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2478,7 +2527,7 @@ def test_create_archive_with_archive_name_format_accepts_borg_placeholders():
|
|
},
|
|
},
|
|
storage_config={'archive_name_format': 'Documents_{hostname}-{now}'}, # noqa: FS003
|
|
storage_config={'archive_name_format': 'Documents_{hostname}-{now}'}, # noqa: FS003
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2522,7 +2571,7 @@ def test_create_archive_with_repository_accepts_borg_placeholders():
|
|
},
|
|
},
|
|
storage_config={'archive_name_format': 'Documents_{hostname}-{now}'}, # noqa: FS003
|
|
storage_config={'archive_name_format': 'Documents_{hostname}-{now}'}, # noqa: FS003
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2565,7 +2614,7 @@ def test_create_archive_with_extra_borg_options_calls_borg_with_extra_options():
|
|
},
|
|
},
|
|
storage_config={'extra_borg_options': {'create': '--extra --options'}},
|
|
storage_config={'extra_borg_options': {'create': '--extra --options'}},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -2626,7 +2675,7 @@ def test_create_archive_with_stream_processes_calls_borg_with_processes_and_read
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
stream_processes=processes,
|
|
stream_processes=processes,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -2652,7 +2701,7 @@ def test_create_archive_with_non_existent_directory_and_source_directories_must_
|
|
},
|
|
},
|
|
storage_config={},
|
|
storage_config={},
|
|
local_borg_version='1.2.3',
|
|
local_borg_version='1.2.3',
|
|
- global_arguments=flexmock(log_json=False),
|
|
|
|
|
|
+ global_arguments=flexmock(log_json=False, used_config_paths=[]),
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|