2022-08-18 23:28:46 +02:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
|
|
|
|
def test_generate_borgmatic_config_with_merging_succeeds():
|
|
|
|
with tempfile.TemporaryDirectory() as temporary_directory:
|
|
|
|
config_path = os.path.join(temporary_directory, 'test.yaml')
|
|
|
|
new_config_path = os.path.join(temporary_directory, 'new.yaml')
|
|
|
|
|
2023-06-25 00:35:10 +02:00
|
|
|
subprocess.check_call(f'borgmatic config generate --destination {config_path}'.split(' '))
|
2022-08-18 23:28:46 +02:00
|
|
|
subprocess.check_call(
|
2023-06-25 00:35:10 +02:00
|
|
|
f'borgmatic config generate --source {config_path} --destination {new_config_path}'.split(
|
2022-08-18 23:28:46 +02:00
|
|
|
' '
|
|
|
|
)
|
|
|
|
)
|