ansible-role-docker/molecule/default/tests/test_default.py
2021-08-25 13:19:53 +02:00

15 lines
398 B
Python

import testinfra.utils.ansible_runner
def test_packages(host):
for package_name in ['docker.io', 'pass']:
package = host.package(package_name)
assert package.is_installed
def test_service(host):
service = host.service('docker')
assert service.is_running
assert service.is_enabled
def test_user_in_docker_group(host):
user = host.user('backup')
assert 'docker' in user.groups