Files
@ 5eb7821a1e4d
Branch filter:
Location: majic-ansible-roles/roles/common/molecule/default/tests/test_deprecated.py - annotation
5eb7821a1e4d
809 B
text/x-python
MAR-218: Switch to using ldap_attrs module:
- Update invocations and syntax.
- Drop the workaround for configuring TLS on the LDAP server (should
be possible to set all relevant attributes at the same time at this
point).
- Group some invocations where it makes sense.
- Update invocations and syntax.
- Drop the workaround for configuring TLS on the LDAP server (should
be possible to set all relevant attributes at the same time at this
point).
- Group some invocations where it makes sense.
5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 72af31a420be 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 5f9f8aef3473 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be 72af31a420be | import os
import testinfra.utils.ansible_runner
import pytest
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-*')
@pytest.mark.parametrize('path', [
'/etc/pip_check_requirements_upgrades-py3/',
'/var/lib/pipreqcheck/virtualenv-py3/',
'/etc/cron.d/check_pip_requirements-py3',
'/etc/ntp.conf',
])
def test_deprecated_paths_are_absent(host, path):
"""
Tests if deprecated paths are absent.
"""
with host.sudo():
assert not host.file(path).exists
@pytest.mark.parametrize('package', [
'ntp',
'ntpdate',
])
def test_deprecated_packages_are_absent(host, package):
"""
Tests if deprecated pacakges are absent.
"""
assert not host.package(package).is_installed
|