Fix config validation broken by schema change (#904).
This commit is contained in:
parent
2bd63bbdd2
commit
548aceb3d5
@ -522,24 +522,18 @@ properties:
|
||||
- disabled
|
||||
description: |
|
||||
Name of the consistency check to run:
|
||||
|
||||
"repository" checks the consistency of the
|
||||
* "repository" checks the consistency of the
|
||||
repository.
|
||||
|
||||
"archives" checks all of the archives.
|
||||
|
||||
"data" verifies the integrity of the data within
|
||||
the archives and implies the "archives" check as
|
||||
well.
|
||||
|
||||
"spot" checks that some percentage of source
|
||||
* "archives" checks all of the archives.
|
||||
* "data" verifies the integrity of the data
|
||||
within the archives and implies the "archives"
|
||||
check as well.
|
||||
* "spot" checks that some percentage of source
|
||||
files are found in the most recent archive (with
|
||||
identical contents).
|
||||
|
||||
"extract" does an extraction dry-run of the most
|
||||
recent archive.
|
||||
|
||||
See "skip_actions" for disabling checks
|
||||
* "extract" does an extraction dry-run of the
|
||||
most recent archive.
|
||||
* See "skip_actions" for disabling checks
|
||||
altogether.
|
||||
example: spot
|
||||
frequency:
|
||||
@ -577,24 +571,18 @@ properties:
|
||||
- repository
|
||||
description: |
|
||||
Name of the consistency check to run:
|
||||
|
||||
"repository" checks the consistency of the
|
||||
* "repository" checks the consistency of the
|
||||
repository.
|
||||
|
||||
"archives" checks all of the archives.
|
||||
|
||||
"data" verifies the integrity of the data within
|
||||
the archives and implies the "archives" check as
|
||||
well.
|
||||
|
||||
"spot" checks that some percentage of source
|
||||
* "archives" checks all of the archives.
|
||||
* "data" verifies the integrity of the data
|
||||
within the archives and implies the "archives"
|
||||
check as well.
|
||||
* "spot" checks that some percentage of source
|
||||
files are found in the most recent archive (with
|
||||
identical contents).
|
||||
|
||||
"extract" does an extraction dry-run of the most
|
||||
recent archive.
|
||||
|
||||
See "skip_actions" for disabling checks
|
||||
* "extract" does an extraction dry-run of the
|
||||
most recent archive.
|
||||
* See "skip_actions" for disabling checks
|
||||
altogether.
|
||||
example: spot
|
||||
frequency:
|
||||
@ -647,24 +635,18 @@ properties:
|
||||
- spot
|
||||
description: |
|
||||
Name of the consistency check to run:
|
||||
|
||||
"repository" checks the consistency of the
|
||||
* "repository" checks the consistency of the
|
||||
repository.
|
||||
|
||||
"archives" checks all of the archives.
|
||||
|
||||
"data" verifies the integrity of the data within
|
||||
the archives and implies the "archives" check as
|
||||
well.
|
||||
|
||||
"spot" checks that some percentage of source
|
||||
* "archives" checks all of the archives.
|
||||
* "data" verifies the integrity of the data
|
||||
within the archives and implies the "archives"
|
||||
check as well.
|
||||
* "spot" checks that some percentage of source
|
||||
files are found in the most recent archive (with
|
||||
identical contents).
|
||||
|
||||
"extract" does an extraction dry-run of the most
|
||||
recent archive.
|
||||
|
||||
See "skip_actions" for disabling checks
|
||||
* "extract" does an extraction dry-run of the
|
||||
most recent archive.
|
||||
* See "skip_actions" for disabling checks
|
||||
altogether.
|
||||
example: repository
|
||||
frequency:
|
||||
|
@ -9,7 +9,7 @@ def test_validate_config_command_with_valid_configuration_succeeds():
|
||||
config_path = os.path.join(temporary_directory, 'test.yaml')
|
||||
|
||||
subprocess.check_call(f'borgmatic config generate --destination {config_path}'.split(' '))
|
||||
exit_code = subprocess.call(f'validate-borgmatic-config --config {config_path}'.split(' '))
|
||||
exit_code = subprocess.call(f'borgmatic config validate --config {config_path}'.split(' '))
|
||||
|
||||
assert exit_code == 0
|
||||
|
||||
@ -24,7 +24,7 @@ def test_validate_config_command_with_invalid_configuration_fails():
|
||||
config_file.write(config)
|
||||
config_file.close()
|
||||
|
||||
exit_code = subprocess.call(f'validate-borgmatic-config --config {config_path}'.split(' '))
|
||||
exit_code = subprocess.call(f'borgmatic config validate --config {config_path}'.split(' '))
|
||||
|
||||
assert exit_code == 1
|
||||
|
||||
@ -35,7 +35,7 @@ def test_validate_config_command_with_show_flag_displays_configuration():
|
||||
|
||||
subprocess.check_call(f'borgmatic config generate --destination {config_path}'.split(' '))
|
||||
output = subprocess.check_output(
|
||||
f'validate-borgmatic-config --config {config_path} --show'.split(' ')
|
||||
f'borgmatic config validate --config {config_path} --show'.split(' ')
|
||||
).decode(sys.stdout.encoding)
|
||||
|
||||
assert 'repositories:' in output
|
||||
|
Loading…
x
Reference in New Issue
Block a user