summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/docker/molecule/default/tests/test_default.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ansible/roles/docker/molecule/default/tests/test_default.py b/ansible/roles/docker/molecule/default/tests/test_default.py
index a73572fd..fc87a6c8 100644
--- a/ansible/roles/docker/molecule/default/tests/test_default.py
+++ b/ansible/roles/docker/molecule/default/tests/test_default.py
@@ -8,6 +8,17 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
+@pytest.mark.parametrize('os_family, packages', [
+ ('debian', ['python3-docker', 'python3-json-pointer', 'iproute2',
+ 'docker-ce']),
+ ('centos', ['python-docker-py', 'python-jsonpointer', 'docker-ce'])
+])
+def test_packages_installed(host, os_family, packages):
+ if host.system_info.distribution == os_family:
+ for package in packages:
+ assert host.package(package).is_installed
+
+
@pytest.mark.parametrize('svc', [
'docker'
])