2022-03-18 18:13:22 +00:00
|
|
|
import pytest
|
2022-03-18 18:07:25 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
import testinfra.utils.ansible_runner
|
|
|
|
|
|
|
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|
|
|
os.environ["MOLECULE_INVENTORY_FILE"]
|
|
|
|
).get_hosts("all")
|
2022-03-18 18:13:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize("package", ["podman", "crun", "slirp4netns"])
|
|
|
|
def test_podman_installed(host, package):
|
2022-03-20 10:25:21 +00:00
|
|
|
assert host.package(package).is_installed
|
2022-03-18 18:13:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_podman_run(host):
|
|
|
|
cmd = host.run("/usr/bin/podman info")
|
|
|
|
|
|
|
|
assert "APIVersion: 3" in cmd.stdout
|
|
|
|
assert cmd.succeeded
|