diff options
| author | Colin Wilk <colin@wilk.cx> | 2026-06-26 22:35:40 +0000 |
|---|---|---|
| committer | Colin Wilk <colin@wilk.cx> | 2026-06-27 15:43:21 +0200 |
| commit | e15d494e96e9f9e6cdf21676ce3644c7894b3b53 (patch) | |
| tree | 51266a035df33c1ff9204299fdd0b89bd8adca4a /molecule/default/tests/test_installation.py | |
| parent | b8d11180605fbf193e76fba04bb63b5ea4908dcf (diff) | |
| download | ansible-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.py | 18 |
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() |