diff options
Diffstat (limited to 'ansible/roles/package-repository-check/molecule/ubuntu/tests/test_default.py')
-rwxr-xr-x | ansible/roles/package-repository-check/molecule/ubuntu/tests/test_default.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ansible/roles/package-repository-check/molecule/ubuntu/tests/test_default.py b/ansible/roles/package-repository-check/molecule/ubuntu/tests/test_default.py new file mode 100755 index 00000000..3e7f3864 --- /dev/null +++ b/ansible/roles/package-repository-check/molecule/ubuntu/tests/test_default.py @@ -0,0 +1,17 @@ +import os +import pytest + +import testinfra.utils.ansible_runner + +testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') + + +@pytest.mark.parametrize('distro,pkg', [ + ('ubuntu', 'resolvconf') +]) +def test_pkg(host, distro, pkg): + os = host.system_info.distribution + if distro == os: + package = host.package(pkg) + assert package.is_installed |