Add a couple of missing tests (#251).
This commit is contained in:
parent
a9a0910817
commit
1366269586
@ -2302,3 +2302,5 @@ properties:
|
||||
description: |
|
||||
Command to use instead of "findmnt".
|
||||
example: /usr/local/bin/findmnt
|
||||
description: |
|
||||
Configuration for integration with the Btrfs filesystem.
|
||||
|
@ -1,4 +1,3 @@
|
||||
import functools
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
|
@ -45,6 +45,22 @@ def test_replace_temporary_subdirectory_with_glob_transforms_path():
|
||||
)
|
||||
|
||||
|
||||
def test_replace_temporary_subdirectory_with_glob_passes_through_non_matching_path():
|
||||
assert (
|
||||
module.replace_temporary_subdirectory_with_glob('/tmp/foo-aet8kn93/borgmatic')
|
||||
== '/tmp/foo-aet8kn93/borgmatic'
|
||||
)
|
||||
|
||||
|
||||
def test_replace_temporary_subdirectory_with_glob_uses_custom_temporary_directory_prefix():
|
||||
assert (
|
||||
module.replace_temporary_subdirectory_with_glob(
|
||||
'/tmp/.borgmatic-aet8kn93/borgmatic', temporary_directory_prefix='.borgmatic-'
|
||||
)
|
||||
== '/tmp/.borgmatic-*/borgmatic'
|
||||
)
|
||||
|
||||
|
||||
def test_runtime_directory_uses_config_option():
|
||||
flexmock(module).should_receive('expand_user_in_path').replace_with(lambda path: path)
|
||||
flexmock(module.os).should_receive('makedirs')
|
||||
|
@ -1,4 +1,3 @@
|
||||
import pytest
|
||||
from flexmock import flexmock
|
||||
|
||||
from borgmatic.hooks.data_source import btrfs as module
|
||||
|
Loading…
x
Reference in New Issue
Block a user