Document the molecule layout
This commit is contained in:
parent
3237335b6d
commit
2a071ab5eb
@ -1,27 +1,39 @@
|
|||||||
# Borg backup role - Molecule testing
|
# Borg backup role - Molecule testing
|
||||||
|
|
||||||
Requirements:
|
## Requirements
|
||||||
|
|
||||||
|
|
||||||
Ansible 2.4 or higher
|
Ansible 2.4 or higher
|
||||||
Molecule 2.17.0 or higher
|
Molecule 2.17.0 or higher
|
||||||
|
|
||||||
Docker host (local or remote through shell environment)
|
Docker host (local or remote through shell environment)
|
||||||
|
|
||||||
## Available tests
|
## Available tests run on all scenarios
|
||||||
|
|
||||||
All scenarios run the same tests by default defined in generic_tests
|
All scenarios run the same tests by default defined in generic_tests. If a test applies to a certain group only, group filtering is done through testinfra with the ansible:// url.
|
||||||
|
Eg:
|
||||||
|
```
|
||||||
|
testinfra_hosts = ["ansible://borgbackup_servers"]
|
||||||
|
```
|
||||||
|
|
||||||
### all
|
### all
|
||||||
|
|
||||||
|
[generic\_files/tests/test_all.py](generic_files/tests/test_all.py)
|
||||||
|
|
||||||
Verify the borg-binary is present
|
Verify the borg-binary is present
|
||||||
|
|
||||||
|
|
||||||
### client
|
### client
|
||||||
|
|
||||||
|
Testinfra: [generic\_files/tests/test_client.py](generic_files/tests/test_client.py)
|
||||||
Verifies if all the required parameters are present on the client to perform a backup. It verifies an already existing backup has run and if it has succeeded.
|
Verifies if all the required parameters are present on the client to perform a backup. It verifies an already existing backup has run and if it has succeeded.
|
||||||
|
|
||||||
|
Testinfra: [generic\_files/tests/test_client_restore.py](generic_files/tests/test_client_restore.py)
|
||||||
|
Verifies if the restore functionality works correctly.
|
||||||
|
|
||||||
### server
|
### server
|
||||||
|
|
||||||
|
Testinfra: [generic\_files/tests/test_server.py](generic_files/tests/test_server.py)
|
||||||
Verifies if all server-related configurations are in place and if the backup is working from a server perspective.
|
Verifies if all server-related configurations are in place and if the backup is working from a server perspective.
|
||||||
|
|
||||||
|
|
||||||
@ -29,7 +41,7 @@ Verifies if all server-related configurations are in place and if the backup is
|
|||||||
|
|
||||||
### clients
|
### clients
|
||||||
|
|
||||||
This tests spins up supported platforms and verifies the basic functionality of both server and client with the generic_tests.
|
This tests spins up supported platforms and verifies the basic functionality of both server and client with the generic_tests on a number of platforms and linux distributions.
|
||||||
|
|
||||||
```
|
```
|
||||||
borgbackup_appendonly:
|
borgbackup_appendonly:
|
||||||
@ -38,35 +50,6 @@ borgbackup_include:
|
|||||||
borgbackup_passphrase:
|
borgbackup_passphrase:
|
||||||
```
|
```
|
||||||
|
|
||||||
### commands
|
|
||||||
|
|
||||||
Verify if both pre and post commands are configured at backup time and are run.
|
|
||||||
|
|
||||||
```
|
|
||||||
borgbackup_pre_commands:
|
|
||||||
borgbackup_post_commands:
|
|
||||||
```
|
|
||||||
|
|
||||||
### folders
|
|
||||||
|
|
||||||
Verify if both inclusion and exclusion of folders is working as expected
|
|
||||||
|
|
||||||
```
|
|
||||||
borgbackup_include:
|
|
||||||
borgbackup_exclude:
|
|
||||||
```
|
|
||||||
|
|
||||||
### lamp
|
|
||||||
|
|
||||||
Verify a basic lamp setup meaning making sure /var/www/ and automysqlbackup is configured properly and backed up.
|
|
||||||
As an extra preparation, apache2 and automysqlbackup are installed for verification.
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
backup_pre_commands: needs to be extended with automysqlbackup
|
|
||||||
borgbackup_include: need to contain both /var/www and /var/lib/automysqlbackup
|
|
||||||
```
|
|
||||||
|
|
||||||
### multiple
|
### multiple
|
||||||
|
|
||||||
Testing whether backing up to multiple targets works properly.
|
Testing whether backing up to multiple targets works properly.
|
||||||
@ -75,9 +58,40 @@ Testing whether backing up to multiple targets works properly.
|
|||||||
borgbackup_servers:
|
borgbackup_servers:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### extra_opts
|
||||||
|
|
||||||
|
Testinfra: [generic\_files/tests/test_server.py](generic_files/tests/test_server.py)
|
||||||
|
|
||||||
|
Verify if both pre and post commands are configured at backup time and are run.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
borgbackup_pre_commands:
|
||||||
|
borgbackup_post_commands:
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify if both inclusion and exclusion of folders is working as expected
|
||||||
|
|
||||||
|
```
|
||||||
|
borgbackup_include:
|
||||||
|
borgbackup_exclude:
|
||||||
|
```
|
||||||
|
|
||||||
|
### lamp
|
||||||
|
|
||||||
|
Testinfra: [generic\_files/tests/test_lamp.py](generic_files/tests/test_lamp.py)
|
||||||
|
Verify a basic lamp setup meaning making sure /var/www/ and automysqlbackup is configured properly and backed up.
|
||||||
|
As an extra preparation, apache2 and automysqlbackup are installed for verification.
|
||||||
|
|
||||||
|
```
|
||||||
|
backup_pre_commands: needs to be extended with automysqlbackup
|
||||||
|
borgbackup_include: need to contain both /var/www and /var/lib/automysqlbackup
|
||||||
|
```
|
||||||
|
|
||||||
### mgt
|
### mgt
|
||||||
|
|
||||||
Testing whether the management-station functionality works
|
Testinfra: [generic\_files/tests/test_mgt.py](generic_files/tests/test_mgt.py)
|
||||||
|
Testing whether the management-station functionality works and all clients are listed.
|
||||||
|
|
||||||
```
|
```
|
||||||
borgbackup_management:
|
borgbackup_management:
|
||||||
@ -85,6 +99,6 @@ borgbackup_management_user:
|
|||||||
borgbackup_management_sshkey:
|
borgbackup_management_sshkey:
|
||||||
```
|
```
|
||||||
|
|
||||||
### restore
|
## restore
|
||||||
|
|
||||||
|
|
||||||
|
A restore is tested by default in every scenario by the use of the side-effect playbook. [generic\_files/side_effect.yml](generic_files/side_effect.yml)
|
||||||
|
Loading…
Reference in New Issue
Block a user