aboutsummaryrefslogtreecommitdiffstats
path: root/molecule/default/tests/test_installation.py
diff options
context:
space:
mode:
authorColin Wilk <colin@wilk.cx>2026-06-26 22:35:40 +0000
committerColin Wilk <colin@wilk.cx>2026-06-27 15:43:21 +0200
commite15d494e96e9f9e6cdf21676ce3644c7894b3b53 (patch)
tree51266a035df33c1ff9204299fdd0b89bd8adca4a /molecule/default/tests/test_installation.py
parentb8d11180605fbf193e76fba04bb63b5ea4908dcf (diff)
downloadansible-role-borgbackup-e15d494e96e9f9e6cdf21676ce3644c7894b3b53.tar.gz
ansible-role-borgbackup-e15d494e96e9f9e6cdf21676ce3644c7894b3b53.zip
test: add larger test suite for role
- Add test systems for client/server setup - Add tests for systemd service and timer files - Add tests for SSH connectivity - Add tests for security configurations - Add tests for multi-instance backup scenarios
Diffstat (limited to 'molecule/default/tests/test_installation.py')
-rw-r--r--molecule/default/tests/test_installation.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/molecule/default/tests/test_installation.py b/molecule/default/tests/test_installation.py
new file mode 100644
index 0000000..b1be621
--- /dev/null
+++ b/molecule/default/tests/test_installation.py
@@ -0,0 +1,18 @@
+testinfra_hosts = ['borg-client', 'borg-server']
+
+
+def test_borg_installed(host):
+ borg = host.package('borgbackup')
+ assert borg.is_installed
+
+
+def test_borg_binary_exists(host):
+ borg = host.file('/usr/bin/borg')
+ assert borg.exists
+ assert borg.mode == 0o755
+
+
+def test_borg_version(host):
+ c = host.run('borg --version')
+ assert c.rc == 0
+ assert 'borg' in c.stdout.lower()