Files
@ 10d5a1e15c30
Branch filter:
Location: majic-ansible-roles/roles/backup/molecule/default/tests/test_parameters_optional.py - annotation
10d5a1e15c30
779 B
text/x-python
MAR-129: Minor fixes after initial testsite run:
- Fix conditional for running handlers in the bootstrap role.
- Add dummy handlers that will suppress Ansible warnings about empty
handler includes.
- Fix conditional for running handlers in the bootstrap role.
- Add dummy handlers that will suppress Ansible warnings about empty
handler includes.
19b29f0c7e7e 19b29f0c7e7e e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 19b29f0c7e7e e1dd478473a2 e1dd478473a2 d0293eece376 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 d0293eece376 e1dd478473a2 d0293eece376 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 d0293eece376 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 d0293eece376 e1dd478473a2 d0293eece376 e1dd478473a2 e1dd478473a2 | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts(['parameters-optional'])
def test_backup_patterns_content(host):
"""
Tests if content of file containing backup patterns is correct.
"""
with host.sudo():
backup_pattern = host.file('/etc/duply/main/patterns/test')
assert backup_pattern.content == "/etc/hosts\n/etc/ethers\n/var/log"
def test_include_content(host):
"""
Tests if content of assembled include file containing backup patterns is
correct.
"""
with host.sudo():
include = host.file('/etc/duply/main/include')
assert include.content == "/etc/hosts\n/etc/ethers\n/var/log"
|