xoxys.yum/molecule/centos7/tests/test_default.py
Robert Kaussow bb2ad29241
Some checks failed
continuous-integration/drone/push Build is failing
refactor docs
2020-01-22 22:36:03 +01:00

26 lines
602 B
Python

import os
import testinfra.utils.ansible_runner
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_yum_cron_is_installed(host):
yum = host.package("yum-cron")
assert yum.is_installed
def test_yum_cron_running_and_enabled(host):
yum = host.service("yum-cron")
assert yum.is_running
assert yum.is_enabled
def test_yum_cron_custom_cronjob(host):
custom = host.file("/etc/cron.d/x-yum")
assert custom.exists