|
@@ -86,28 +86,28 @@ def test_make_repository_archive_flags_with_borg_features_joins_repository_and_a
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
@pytest.mark.parametrize(
|
|
- 'match_archives, archive_name_format,feature_available,expected_result',
|
|
|
|
|
|
+ 'match_archives,archive_name_format,feature_available,expected_result',
|
|
(
|
|
(
|
|
(None, None, True, ()),
|
|
(None, None, True, ()),
|
|
(None, '', True, ()),
|
|
(None, '', True, ()),
|
|
(
|
|
(
|
|
're:foo-.*',
|
|
're:foo-.*',
|
|
- '{hostname}-{now}',
|
|
|
|
|
|
+ '{hostname}-{now}', # noqa: FS003
|
|
True,
|
|
True,
|
|
('--match-archives', 're:foo-.*'),
|
|
('--match-archives', 're:foo-.*'),
|
|
- ), # noqa: FS003
|
|
|
|
|
|
+ ),
|
|
(
|
|
(
|
|
'sh:foo-*',
|
|
'sh:foo-*',
|
|
- '{hostname}-{now}',
|
|
|
|
|
|
+ '{hostname}-{now}', # noqa: FS003
|
|
False,
|
|
False,
|
|
('--glob-archives', 'foo-*'),
|
|
('--glob-archives', 'foo-*'),
|
|
- ), # noqa: FS003
|
|
|
|
|
|
+ ),
|
|
(
|
|
(
|
|
'foo-*',
|
|
'foo-*',
|
|
- '{hostname}-{now}',
|
|
|
|
|
|
+ '{hostname}-{now}', # noqa: FS003
|
|
False,
|
|
False,
|
|
('--glob-archives', 'foo-*'),
|
|
('--glob-archives', 'foo-*'),
|
|
- ), # noqa: FS003
|
|
|
|
|
|
+ ),
|
|
(
|
|
(
|
|
None,
|
|
None,
|
|
'{hostname}-docs-{now}', # noqa: FS003
|
|
'{hostname}-docs-{now}', # noqa: FS003
|
|
@@ -133,6 +133,18 @@ def test_make_repository_archive_flags_with_borg_features_joins_repository_and_a
|
|
False,
|
|
False,
|
|
('--glob-archives', '{hostname}-docs-*'), # noqa: FS003
|
|
('--glob-archives', '{hostname}-docs-*'), # noqa: FS003
|
|
),
|
|
),
|
|
|
|
+ (
|
|
|
|
+ None,
|
|
|
|
+ '{now}', # noqa: FS003
|
|
|
|
+ False,
|
|
|
|
+ (),
|
|
|
|
+ ),
|
|
|
|
+ (
|
|
|
|
+ None,
|
|
|
|
+ '{now}', # noqa: FS003
|
|
|
|
+ True,
|
|
|
|
+ (),
|
|
|
|
+ ),
|
|
(None, '{utcnow}-docs-{user}', False, ('--glob-archives', '*-docs-{user}')), # noqa: FS003
|
|
(None, '{utcnow}-docs-{user}', False, ('--glob-archives', '*-docs-{user}')), # noqa: FS003
|
|
),
|
|
),
|
|
)
|
|
)
|