Debian Codegraph @

ansible_collections/google/cloud/molecule/gcloud/tests/test_default.py

raw
1 from __future__ import (absolute_import, division, print_function)
2 import os
3 import testinfra.utils.ansible_runner
4
5 __metaclass__ = type
6
7 testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
8 os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
9
10
11 def test_service(host):
12 service = host.service('docker')
13
14 assert service.is_running
15 assert service.is_enabled
16
17
18 def test_hosts_file(host):
19 f = host.file('/etc/hosts')
20
21 assert f.exists
22 assert f.user == 'root'
23 assert f.group == 'root'