xoxys.lvm/molecule/default/tests/test_default.py
Robert Kaussow 6639fb7e0e
Some checks failed
continuous-integration/drone/push Build is failing
fix type error
2019-10-20 23:51:27 +02:00

21 lines
534 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_lvm_in_fstab(host):
fstab = host.file("/etc/fstab")
assert fstab.contains("/dev/mapper/vg_test-lv_test")
def test_lvm_mounted(host):
mount = host.check_output("mount")
lvm = "/dev/mapper/vg_test-lv_test on /mnt/data type ext4"
assert lvm in mount