diff options
Diffstat (limited to 'molecule/default/tests')
| -rw-r--r-- | molecule/default/tests/test_client_setup.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/molecule/default/tests/test_client_setup.py b/molecule/default/tests/test_client_setup.py index f59c6db..78e751a 100644 --- a/molecule/default/tests/test_client_setup.py +++ b/molecule/default/tests/test_client_setup.py @@ -301,6 +301,33 @@ class TestBackupScript: else: pytest.fail(f"Unexpected hostname: {hostname}") + def test_backup_script_contains_additional_arguments(self, host): + hostname = host.backend.get_hostname() + + if hostname == "borg-client-multi-keys": + script1 = host.file("/usr/local/bin/run_borg_backup@configs-keys") + script2 = host.file("/usr/local/bin/run_borg_backup@home-data-keys") + assert "--stats" in script1.content_string + assert "--list" in script1.content_string + assert "--filter=AME" in script1.content_string + assert "--one-file-system" in script2.content_string + assert "--exclude-caches" in script2.content_string + elif hostname == "borg-client-2": + script = host.file("/usr/local/bin/run_borg_backup") + content = script.content_string + assert "-C zlib,6" in content + + def test_backup_script_compression_override(self, host): + hostname = host.backend.get_hostname() + if hostname != "borg-client-2": + return + + script = host.file("/usr/local/bin/run_borg_backup") + content = script.content_string + + assert "-C lz4" in content + assert "-C zlib,6" in content + def test_backup_script_contains_borg_rsh_when_per_repo(self, host): hostname = host.backend.get_hostname() per_repo = get_client_ssh_key_per_repo(host) |