xoxys.chrony/molecule/rocky8/tests/test_default.py

14 lines
315 B
Python
Raw Normal View History

2022-04-10 15:26:44 +00:00
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
def test_chrony_running_and_enabled(host):
2022-04-10 15:38:37 +00:00
chrony = host.service("chronyd")
assert chrony.is_running
assert chrony.is_enabled