[Feature] Add label variable interpolation in hook context #861

Closed
codimp wants to merge 5 commits from codimp/borgmatic:label-variable-interpolation-in-hook-context into main
Showing only changes of commit 3bc2c12f47 - Show all commits

View File

@ -494,10 +494,10 @@ def test_run_actions_adds_log_file_to_hook_context():
expected = flexmock()
flexmock(borgmatic.actions.create).should_receive('run_create').with_args(
config_filename=object,
repository={'path': 'repo'},
repository={'path': 'repo', 'label': ''},
config={'repositories': []},
config_paths=[],
hook_context={'repository': 'repo', 'repositories': '', 'log_file': 'foo'},
hook_context={'repository': 'repo', 'label': '', 'repositories': '', 'log_file': 'foo'},
local_borg_version=object,
create_arguments=object,
global_arguments=object,
@ -515,7 +515,7 @@ def test_run_actions_adds_log_file_to_hook_context():
local_path=flexmock(),
remote_path=flexmock(),
local_borg_version=flexmock(),
repository={'path': 'repo'},
repository={'path': 'repo', 'label': ''},
)
)
assert result == (expected,)