From 68f9c1b950d81c2626859856406120cfc902ab57 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 18 Aug 2022 14:28:46 -0700 Subject: [PATCH] Add generate-borgmatic-config end-to-end test. --- tests/end-to-end/test_generate_config.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/end-to-end/test_generate_config.py diff --git a/tests/end-to-end/test_generate_config.py b/tests/end-to-end/test_generate_config.py new file mode 100644 index 000000000..b8cade96d --- /dev/null +++ b/tests/end-to-end/test_generate_config.py @@ -0,0 +1,16 @@ +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') + + subprocess.check_call(f'generate-borgmatic-config --destination {config_path}'.split(' ')) + subprocess.check_call( + f'generate-borgmatic-config --source {config_path} --destination {new_config_path}'.split( + ' ' + ) + )