xoxys.lvm/molecule/default/tests/test_default.py
Robert Kaussow 04c8df9f32
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci: migrate to woodpecker
2024-02-18 13:16:42 +01:00

19 lines
455 B
Python

import os
import testinfra.utils.ansible_runner
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