add minimal molecule test

This commit is contained in:
Robert Kaussow 2022-03-18 19:13:22 +01:00
parent a6cf71eddf
commit fd2a27e13d
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -1,3 +1,4 @@
import pytest
import os
import testinfra.utils.ansible_runner
@ -5,3 +6,15 @@ import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
@pytest.mark.parametrize("package", ["podman", "crun", "slirp4netns"])
def test_podman_installed(host, package):
assert not host.package(package).is_installed
def test_podman_run(host):
cmd = host.run("/usr/bin/podman info")
assert "APIVersion: 3" in cmd.stdout
assert cmd.succeeded