xoxys.smb/molecule/centos8/tests/test_default.py
Robert Kaussow 7b847ef503
Some checks failed
continuous-integration/drone/push Build is failing
add centos 8 testing
2020-01-26 15:55:10 +01:00

22 lines
606 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_smb_in_fstab(host):
fstab = host.file("/etc/fstab")
assert fstab.contains("//share.example.com/media")
def test_smb_credentials(host):
credentials = host.file("/root/.smbcredentials/multimedia")
assert credentials.exists
assert credentials.contains("username=myuser")
assert credentials.contains("password=secure")