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