Fix restore paths list to tuple conversion.
the build was successful Details

This commit is contained in:
Dan Helfman 2019-02-18 21:59:09 -08:00
parent 5ea2d644a2
commit fe92d9e838
2 changed files with 13 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def extract_archive(
full_command = (
(local_path, 'extract', '::'.join((repository, archive)))
+ (restore_paths if restore_paths else ())
+ (tuple(restore_paths) if restore_paths else ())
+ (('--remote-path', remote_path) if remote_path else ())
+ (('--umask', str(umask)) if umask else ())
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())

View File

@ -103,6 +103,18 @@ def test_extract_last_archive_dry_run_calls_borg_with_lock_wait_parameters():
module.extract_last_archive_dry_run(repository='repo', lock_wait=5)
def test_extract_archive_calls_borg_with_restore_path_parameters():
insert_subprocess_mock(('borg', 'extract', 'repo::archive', 'path1', 'path2'))
module.extract_archive(
dry_run=False,
repository='repo',
archive='archive',
restore_paths=['path1', 'path2'],
storage_config={},
)
def test_extract_archive_calls_borg_with_remote_path_parameters():
insert_subprocess_mock(('borg', 'extract', 'repo::archive', '--remote-path', 'borg1'))