Deprecated configuration options warning logging.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-06-29 10:03:36 -07:00
parent e2c95327fb
commit 9cf27fa4ba
7 changed files with 140 additions and 51 deletions

View File

@@ -12,7 +12,6 @@ def test_parse_arguments_with_no_arguments_uses_defaults():
global_arguments = arguments['global']
assert global_arguments.config_paths == config_paths
assert global_arguments.excludes_filename is None
assert global_arguments.verbosity == 0
assert global_arguments.syslog_verbosity == 0
assert global_arguments.log_file_verbosity == 0
@@ -71,7 +70,6 @@ def test_parse_arguments_with_verbosity_overrides_default():
global_arguments = arguments['global']
assert global_arguments.config_paths == config_paths
assert global_arguments.excludes_filename is None
assert global_arguments.verbosity == 1
assert global_arguments.syslog_verbosity == 0
assert global_arguments.log_file_verbosity == 0
@@ -85,7 +83,6 @@ def test_parse_arguments_with_syslog_verbosity_overrides_default():
global_arguments = arguments['global']
assert global_arguments.config_paths == config_paths
assert global_arguments.excludes_filename is None
assert global_arguments.verbosity == 0
assert global_arguments.syslog_verbosity == 2
@@ -98,7 +95,6 @@ def test_parse_arguments_with_log_file_verbosity_overrides_default():
global_arguments = arguments['global']
assert global_arguments.config_paths == config_paths
assert global_arguments.excludes_filename is None
assert global_arguments.verbosity == 0
assert global_arguments.syslog_verbosity == 0
assert global_arguments.log_file_verbosity == -1
@@ -234,13 +230,6 @@ def test_parse_arguments_disallows_invalid_argument():
module.parse_arguments('--posix-me-harder')
def test_parse_arguments_disallows_deprecated_excludes_option():
flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
with pytest.raises(ValueError):
module.parse_arguments('--config', 'myconfig', '--excludes', 'myexcludes')
def test_parse_arguments_disallows_encryption_mode_without_init():
flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])

View File

@@ -46,7 +46,7 @@ def test_parse_configuration_transforms_file_into_mapping():
- /etc
repositories:
- hostname.borg
- path: hostname.borg
retention:
keep_minutely: 60
@@ -83,7 +83,7 @@ def test_parse_configuration_passes_through_quoted_punctuation():
- "/home/{escaped_punctuation}"
repositories:
- test.borg
- path: test.borg
'''
)
@@ -106,7 +106,7 @@ def test_parse_configuration_with_schema_lacking_examples_does_not_raise():
- /home
repositories:
- hostname.borg
- path: hostname.borg
''',
'''
map:
@@ -135,7 +135,7 @@ def test_parse_configuration_inlines_include():
- /home
repositories:
- hostname.borg
- path: hostname.borg
retention:
!include include.yaml
@@ -168,7 +168,7 @@ def test_parse_configuration_merges_include():
- /home
repositories:
- hostname.borg
- path: hostname.borg
retention:
keep_daily: 1
@@ -221,7 +221,7 @@ def test_parse_configuration_raises_for_validation_error():
location:
source_directories: yes
repositories:
- hostname.borg
- path: hostname.borg
'''
)
@@ -237,7 +237,7 @@ def test_parse_configuration_applies_overrides():
- /home
repositories:
- hostname.borg
- path: hostname.borg
local_path: borg1
'''
@@ -265,7 +265,7 @@ def test_parse_configuration_applies_normalization():
- /home
repositories:
- hostname.borg
- path: hostname.borg
exclude_if_present: .nobackup
'''
@@ -280,4 +280,4 @@ def test_parse_configuration_applies_normalization():
'exclude_if_present': ['.nobackup'],
}
}
assert logs == []
assert logs