test_generate_config.py 588 B

12345678910111213141516
  1. import os
  2. import subprocess
  3. import tempfile
  4. def test_generate_borgmatic_config_with_merging_succeeds():
  5. with tempfile.TemporaryDirectory() as temporary_directory:
  6. config_path = os.path.join(temporary_directory, 'test.yaml')
  7. new_config_path = os.path.join(temporary_directory, 'new.yaml')
  8. subprocess.check_call(f'borgmatic config generate --destination {config_path}'.split(' '))
  9. subprocess.check_call(
  10. f'borgmatic config generate --source {config_path} --destination {new_config_path}'.split(
  11. ' '
  12. )
  13. )