xoxys.yum/molecule/ec2-centos-7/tests/test_default.py
Robert Kaussow a0e0e36911
All checks were successful
continuous-integration/drone/push Build is passing
fix pep8
2019-06-09 13:39:19 +02:00

21 lines
486 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_running_and_enabled(host):
yum = host.service("yum-cron")
assert yum.is_running
assert yum.is_enabled