summaryrefslogtreecommitdiffstats
path: root/ansible/roles/docker
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-04-30 05:02:03 -0700
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-04-30 05:37:04 -0700
commit3a7d5955f7c287f33e1301601909941793d016db (patch)
tree84346e9bbcad00c9b86ddd01f687c8cc84c2a0cc /ansible/roles/docker
parent69d40108919ea4cece1db1632a6dfd43750d4840 (diff)
Verify required packages were installed on target host
Change-Id: Ic074cbabfee614daf7862466a1bbafc9ff0fb6be Issue-ID: INT-1576 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/docker')
-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'
])