summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-05-04 08:16:40 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-04 08:16:40 +0000
commitae8a51df158d28e647d551ed02530951715d6a3a (patch)
tree812645e8d7b314ddcee220fff12b364f0cecaae0 /ansible/roles
parentb4cfa9b74e91941412c33c01656c34c6a198b8ea (diff)
parent3a7d5955f7c287f33e1301601909941793d016db (diff)
Merge "Verify required packages were installed on target host"
Diffstat (limited to 'ansible/roles')
-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'
])