Skip to content
Snippets Groups Projects
Commit c4cffa8e authored by nimrod's avatar nimrod
Browse files

- Updated tests to use the new host fixture in Testinfra 1.6.0.

parent f66cd0fc
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,10 @@ from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_example(Command):
assert Command('uname').rc == 0
def test_example(host):
assert host.run('uname').rc == 0
def test_root(Command, Sudo):
with Sudo():
assert Command('whoami').stdout.strip() == 'root'
def test_root(host):
with host.sudo():
assert host.run('whoami').stdout.strip() == 'root'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment