Tests for --dry-run + --verbosity fix.
This commit is contained in:
parent
bb99009191
commit
a72f5ff69a
3 changed files with 44 additions and 1 deletions
2
AUTHORS
2
AUTHORS
|
@ -4,7 +4,7 @@ Alexander Görtz: Python 3 compatibility
|
||||||
Henning Schroeder: Copy editing
|
Henning Schroeder: Copy editing
|
||||||
Johannes Feichtner: Support for user hooks
|
Johannes Feichtner: Support for user hooks
|
||||||
Michele Lazzeri: Custom archive names
|
Michele Lazzeri: Custom archive names
|
||||||
newtonne: Reading encryption password from external file
|
newtonne: Read encryption password from external file
|
||||||
Robin `ypid` Schneider: Support additional options of Borg
|
Robin `ypid` Schneider: Support additional options of Borg
|
||||||
Scott Squires: Custom archive names
|
Scott Squires: Custom archive names
|
||||||
Thomas LÉVEIL: Support for a keep_minutely prune option
|
Thomas LÉVEIL: Support for a keep_minutely prune option
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
1.1.15.dev0
|
1.1.15.dev0
|
||||||
* Support for Borg BORG_PASSCOMMAND environment variable to read a password from an external file.
|
* Support for Borg BORG_PASSCOMMAND environment variable to read a password from an external file.
|
||||||
* #55: Fix for missing tags/releases from Gitea and GitHub project hosting.
|
* #55: Fix for missing tags/releases from Gitea and GitHub project hosting.
|
||||||
|
* Fix for Borg create error when using borgmatic's --dry-run and --verbosity options together.
|
||||||
|
|
||||||
1.1.14
|
1.1.14
|
||||||
* #49: Fix for typo in --patterns-from option.
|
* #49: Fix for typo in --patterns-from option.
|
||||||
|
|
|
@ -317,6 +317,48 @@ def test_create_archive_with_dry_run_calls_borg_with_dry_run_parameter():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_create_archive_with_dry_run_and_verbosity_some_calls_borg_without_stats_parameter():
|
||||||
|
flexmock(module).should_receive('_expand_directory').and_return(['foo']).and_return(['bar'])
|
||||||
|
flexmock(module).should_receive('_write_pattern_file').and_return(None)
|
||||||
|
flexmock(module).should_receive('_make_pattern_flags').and_return(())
|
||||||
|
flexmock(module).should_receive('_make_pattern_flags').and_return(())
|
||||||
|
flexmock(module).should_receive('_make_exclude_flags').and_return(())
|
||||||
|
insert_subprocess_mock(CREATE_COMMAND + ('--info', '--dry-run'))
|
||||||
|
|
||||||
|
module.create_archive(
|
||||||
|
verbosity=VERBOSITY_SOME,
|
||||||
|
dry_run=True,
|
||||||
|
repository='repo',
|
||||||
|
location_config={
|
||||||
|
'source_directories': ['foo', 'bar'],
|
||||||
|
'repositories': ['repo'],
|
||||||
|
'exclude_patterns': None,
|
||||||
|
},
|
||||||
|
storage_config={},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_create_archive_with_dry_run_and_verbosity_lots_calls_borg_without_stats_parameter():
|
||||||
|
flexmock(module).should_receive('_expand_directory').and_return(['foo']).and_return(['bar'])
|
||||||
|
flexmock(module).should_receive('_write_pattern_file').and_return(None)
|
||||||
|
flexmock(module).should_receive('_make_pattern_flags').and_return(())
|
||||||
|
flexmock(module).should_receive('_make_pattern_flags').and_return(())
|
||||||
|
flexmock(module).should_receive('_make_exclude_flags').and_return(())
|
||||||
|
insert_subprocess_mock(CREATE_COMMAND + ('--debug', '--list', '--dry-run'))
|
||||||
|
|
||||||
|
module.create_archive(
|
||||||
|
verbosity=VERBOSITY_LOTS,
|
||||||
|
dry_run=True,
|
||||||
|
repository='repo',
|
||||||
|
location_config={
|
||||||
|
'source_directories': ['foo', 'bar'],
|
||||||
|
'repositories': ['repo'],
|
||||||
|
'exclude_patterns': None,
|
||||||
|
},
|
||||||
|
storage_config={},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_create_archive_with_compression_calls_borg_with_compression_parameters():
|
def test_create_archive_with_compression_calls_borg_with_compression_parameters():
|
||||||
flexmock(module).should_receive('_expand_directory').and_return(['foo']).and_return(['bar'])
|
flexmock(module).should_receive('_expand_directory').and_return(['foo']).and_return(['bar'])
|
||||||
flexmock(module).should_receive('_write_pattern_file').and_return(None)
|
flexmock(module).should_receive('_write_pattern_file').and_return(None)
|
||||||
|
|
Loading…
Reference in a new issue