Files
@ 74b1cab547fc
Branch filter:
Location: majic-ansible-roles/roles/backup/tests/test_default.py - annotation
74b1cab547fc
875 B
text/x-python
MAR-122: Fixed handling of complex package versions for pip with Ansible 2.x:
- Use list for installing specific version of pip in the "pipreqcheck" virtual
environment in common role.
- Removed superficious (and incorrect) definition for application admin username
in wsgi_website role.
- Updated test playbook for wsgi_website role to test the fix.
- Switched to passing-in package list for installing packages in virtual
environment instead of using "with_items" in wsgi_website role.
- Use list for installing specific version of pip in the "pipreqcheck" virtual
environment in common role.
- Removed superficious (and incorrect) definition for application admin username
in wsgi_website role.
- Updated test playbook for wsgi_website role to test the fix.
- Switched to passing-in package list for installing packages in virtual
environment instead of using "with_items" in wsgi_website role.
6354365357f2 6354365357f2 e1dd478473a2 6354365357f2 6354365357f2 6354365357f2 6354365357f2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 6354365357f2 e1dd478473a2 e1dd478473a2 e1dd478473a2 e1dd478473a2 | import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'.molecule/ansible_inventory').get_hosts('all')
def test_backup_patterns_file(File, Sudo):
"""
Tests if deployed file with backup patterns has correct permissions.
"""
with Sudo():
backup_pattern = File('/etc/duply/main/patterns/test')
assert backup_pattern.is_file
assert backup_pattern.user == 'root'
assert backup_pattern.group == 'root'
assert backup_pattern.mode == 0o600
def test_include_file(File, Sudo):
"""
Tests if assembled include file has correct permissions.
"""
with Sudo():
include = File('/etc/duply/main/include')
assert include.is_file
assert include.user == 'root'
assert include.group == 'root'
assert include.mode == 0o600
|