From 55c153409ea08b43ae0aa0e74a2ad3854bcc1cad Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 18 Mar 2023 14:07:38 -0700 Subject: [PATCH] Add "source_directories_must_exist" option to NEWS (#501). --- NEWS | 2 ++ tests/unit/borg/test_create.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7e8e6f9f..239b30a0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ 1.7.10.dev0 + * #501: Optionally error if a source directory does not exist when "source_directories_must_exist" + option in location configuration section is true. * #618: Support for BORG_FILES_CACHE_TTL environment variable via "borg_files_cache_ttl" option in borgmatic's storage configuration. diff --git a/tests/unit/borg/test_create.py b/tests/unit/borg/test_create.py index 04afa872..69a3ede2 100644 --- a/tests/unit/borg/test_create.py +++ b/tests/unit/borg/test_create.py @@ -2532,9 +2532,9 @@ def test_create_archive_with_stream_processes_calls_borg_with_processes_and_read def test_create_archive_with_non_existent_directory_and_source_directories_must_exist_raises_error(): - """ + ''' If a source directory doesn't exist and source_directories_must_exist is True, raise an error. - """ + ''' 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([])