Просмотр исходного кода

Add Fedora schema loading fix to NEWS (#703).

Dan Helfman 2 лет назад
Родитель
Сommit
1a5b3c9e4e
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      NEWS
  2. 2 2
      tests/unit/config/test_validate.py

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@
    or monitoring), so not even errors are shown.
  * #688: Tweak archive check probing logic to use the newest timestamp found when multiple exist.
  * #659: Add Borg 2 date-based matching flags to various actions for archive selection.
+ * #703: Fix an error when loading the configuration schema on Fedora Linux.
  * #704: Fix "check" action error when repository and archive checks are configured but the archive
    check gets skipped due to the configured frequency.
  * #706: Fix "--archive latest" on "list" and "info" actions that only worked on the first of

+ 2 - 2
tests/unit/config/test_validate.py

@@ -11,7 +11,7 @@ from borgmatic.config import validate as module
 def test_schema_filename_finds_schema_path():
     schema_path = '/var/borgmatic/config/schema.yaml'
 
-    flexmock(os.path).should_receive('dirname').and_return("/var/borgmatic/config")
+    flexmock(os.path).should_receive('dirname').and_return('/var/borgmatic/config')
     builtins = flexmock(sys.modules['builtins'])
     builtins.should_receive('open').with_args(schema_path).and_return(StringIO())
     assert module.schema_filename() == schema_path
@@ -20,7 +20,7 @@ def test_schema_filename_finds_schema_path():
 def test_schema_filename_raises_filenotfounderror():
     schema_path = '/var/borgmatic/config/schema.yaml'
 
-    flexmock(os.path).should_receive('dirname').and_return("/var/borgmatic/config")
+    flexmock(os.path).should_receive('dirname').and_return('/var/borgmatic/config')
     builtins = flexmock(sys.modules['builtins'])
     builtins.should_receive('open').with_args(schema_path).and_raise(FileNotFoundError)