common/molecule/default/tests/test_default.py

16 lines
389 B
Python
Raw Normal View History

2020-01-14 02:07:21 -05:00
import os
2020-01-14 02:52:08 -05:00
import pytest
2020-01-14 02:07:21 -05:00
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
2020-01-14 02:52:08 -05:00
@pytest.mark.parametrize(
'package_name',
['bash-completion', 'colordiff', 'curl', 'less', 'vim'],
)
def test_packages(host, package_name):
assert host.package(package_name).is_installed