Skip to content
Snippets Groups Projects
test_example.py 310 B
Newer Older
from testinfra.utils.ansible_runner import AnsibleRunner

testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')


nimrod's avatar
nimrod committed
def test_example(Command):
    assert Command('uname').rc == 0
def test_root(Command, Sudo):
    with Sudo():
        assert Command('whoami').stdout.strip() == 'root'