@@ -12,15 +12,30 @@ def test_backup(host):
Tests if Prosody data directory is correctly backed-up.
"""
# Deliver a couple of messages in order to make sure the directory structure
# is created.
send = host.run("echo 'Hello' | sendxmpp --tls-ca-path /usr/local/share/ca-certificates/testca.crt "
"-t -u jane.doe -p janepassword -j domain2:5222 jane.doe@domain2")
assert send.rc == 0
"-t -u mick.doe -p mickpassword -j domain3:5222 mick.doe@domain3")
distribution_release = host.ansible("setup")["ansible_facts"]["ansible_distribution_release"]
# Ugly, but functional for now.
if distribution_release == "bullseye":
else:
send = host.run(f"echo 'Hello' | go-sendxmpp --debug "
f"--username jane.doe@domain2 --password janepassword --jserver domain2:5222 "
f"jane.doe@domain2")
f"--username mick.doe@domain3 --password mickpassword --jserver domain3:5222 "
f"mick.doe@domain3")
with host.sudo():