ansible-role-docker/molecule/default/tests/test_default.py

16 lines
398 B
Python
Raw Permalink Normal View History

2021-08-25 11:19:53 +00:00
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