|
@@ -16,7 +16,7 @@ def test_gnupg_private_keys_file_content(host):
|
|
|
with host.sudo():
|
|
|
gnupg_private_keys = host.file('/etc/duply/main/private_keys.asc')
|
|
|
|
|
|
assert gnupg_private_keys.content == open('tests/data/gnupg/parameters-optional.asc', 'r').read().strip()
|
|
|
assert gnupg_private_keys.content_string == open('tests/data/gnupg/parameters-optional.asc', 'r').read().strip()
|
|
|
|
|
|
|
|
|
def test_gnupg_public_keys_file_content(host):
|
|
@@ -27,9 +27,9 @@ def test_gnupg_public_keys_file_content(host):
|
|
|
with host.sudo():
|
|
|
gnupg_public_keys = host.file('/etc/duply/main/public_keys.asc')
|
|
|
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_1.asc', 'r').read().strip() in gnupg_public_keys.content
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_2.asc', 'r').read().strip() in gnupg_public_keys.content
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_3.asc', 'r').read().strip() in gnupg_public_keys.content
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_1.asc', 'r').read().strip() in gnupg_public_keys.content_string
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_2.asc', 'r').read().strip() in gnupg_public_keys.content_string
|
|
|
assert open('tests/data/gnupg/additional_encryption_key_3.asc', 'r').read().strip() in gnupg_public_keys.content_string
|
|
|
|
|
|
|
|
|
def test_backup_ssh_key_file_content(host):
|
|
@@ -41,7 +41,7 @@ def test_backup_ssh_key_file_content(host):
|
|
|
|
|
|
ssh_key = host.file('/etc/duply/main/ssh/identity')
|
|
|
|
|
|
assert ssh_key.content == open('tests/data/ssh/parameters-optional', 'r').read().strip()
|
|
|
assert ssh_key.content_string == open('tests/data/ssh/parameters-optional', 'r').read().strip()
|
|
|
|
|
|
|
|
|
def test_known_hosts_content(host):
|
|
@@ -53,7 +53,7 @@ def test_known_hosts_content(host):
|
|
|
|
|
|
known_hosts = host.file('/etc/duply/main/ssh/known_hosts')
|
|
|
|
|
|
assert known_hosts.content == open('tests/data/ssh/parameters-optional-known_hosts', 'r').read()
|
|
|
assert known_hosts.content_string == open('tests/data/ssh/parameters-optional-known_hosts', 'r').read()
|
|
|
|
|
|
|
|
|
def test_duply_configuration_content(host):
|
|
@@ -65,11 +65,11 @@ def test_duply_configuration_content(host):
|
|
|
|
|
|
duply_configuration = host.file('/etc/duply/main/conf')
|
|
|
|
|
|
assert "GPG_KEYS_ENC='C4B2AE9F7A4F400A,3093C91BC3A9444B,86816FD928063B3F,8A14CD6C71223B72'" in duply_configuration.content
|
|
|
assert "GPG_KEY_SIGN='C4B2AE9F7A4F400A'" in duply_configuration.content
|
|
|
assert "TARGET='pexpect+sftp://backupuser@10.31.127.10:3333//duplicity/parameters-optional-s64'" in duply_configuration.content
|
|
|
assert "GPG_KEYS_ENC='C4B2AE9F7A4F400A,3093C91BC3A9444B,86816FD928063B3F,8A14CD6C71223B72'" in duply_configuration.content_string
|
|
|
assert "GPG_KEY_SIGN='C4B2AE9F7A4F400A'" in duply_configuration.content_string
|
|
|
assert "TARGET='pexpect+sftp://backupuser@10.31.127.10:3333//duplicity/parameters-optional-s64'" in duply_configuration.content_string
|
|
|
assert "DUPL_PARAMS=\"$DUPL_PARAMS --ssh-options='-oLogLevel=ERROR -oUserKnownHostsFile=/dev/null " \
|
|
|
"-oGlobalKnownHostsFile=/etc/duply/main/ssh/known_hosts -oIdentityFile=/etc/duply/main/ssh/identity'\"" in duply_configuration.content
|
|
|
"-oGlobalKnownHostsFile=/etc/duply/main/ssh/known_hosts -oIdentityFile=/etc/duply/main/ssh/identity'\"" in duply_configuration.content_string
|
|
|
|
|
|
|
|
|
def test_duply_gnupg_keyring_private_keys(host):
|