ansible-role-luks/molecule/default/tests/test_default.py

13 lines
391 B
Python
Raw Normal View History

2021-09-12 21:58:11 +00:00
import testinfra.utils.ansible_runner
def test_packages(host):
for package_name in ['cryptsetup', 'util-linux']:
package = host.package(package_name)
assert package.is_installed
def test_mount_device_encrypted(host):
mount = host.mount_point('/mnt/data_decrypted')
assert mount.exists
assert mount.device == '/dev/mapper/data_encrypted'
assert mount.filesystem == 'ext4'