Fix generate-borgmatic-config with "--source" flag to support more complex schema changes like the new Healthchecks configuration options (#536).
This commit is contained in:
parent
37327379bc
commit
be59a3e574
4 changed files with 8 additions and 2 deletions
4
NEWS
4
NEWS
|
@ -1,3 +1,7 @@
|
|||
1.6.2.dev0
|
||||
* #536: Fix generate-borgmatic-config with "--source" flag to support more complex schema changes
|
||||
like the new Healthchecks configuration options.
|
||||
|
||||
1.6.1
|
||||
* #294: Add Healthchecks monitoring hook "ping_body_limit" option to configure how many bytes of
|
||||
logs to send to the Healthchecks server.
|
||||
|
|
|
@ -5,7 +5,7 @@ import re
|
|||
|
||||
from ruamel import yaml
|
||||
|
||||
from borgmatic.config import load
|
||||
from borgmatic.config import load, normalize
|
||||
|
||||
INDENT = 4
|
||||
SEQUENCE_INDENT = 2
|
||||
|
@ -275,6 +275,7 @@ def generate_sample_configuration(source_filename, destination_filename, schema_
|
|||
|
||||
if source_filename:
|
||||
source_config = load.load_configuration(source_filename)
|
||||
normalize.normalize(source_config)
|
||||
|
||||
destination_config = merge_source_configuration_into_destination(
|
||||
_schema_to_sample_configuration(schema), source_config
|
||||
|
|
2
setup.py
2
setup.py
|
@ -1,6 +1,6 @@
|
|||
from setuptools import find_packages, setup
|
||||
|
||||
VERSION = '1.6.1'
|
||||
VERSION = '1.6.2.dev0'
|
||||
|
||||
|
||||
setup(
|
||||
|
|
|
@ -212,6 +212,7 @@ def test_generate_sample_configuration_with_source_filename_does_not_raise():
|
|||
builtins.should_receive('open').with_args('schema.yaml').and_return('')
|
||||
flexmock(module.yaml).should_receive('round_trip_load')
|
||||
flexmock(module.load).should_receive('load_configuration')
|
||||
flexmock(module.normalize).should_receive('normalize')
|
||||
flexmock(module).should_receive('_schema_to_sample_configuration')
|
||||
flexmock(module).should_receive('merge_source_configuration_into_destination')
|
||||
flexmock(module).should_receive('render_configuration')
|
||||
|
|
Loading…
Reference in a new issue