xoxys.podman/molecule/rocky8/tests/test_default.py

21 lines
493 B
Python
Raw Normal View History

2022-03-18 19:13:22 +01:00
import pytest
2022-03-18 19:07:25 +01: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 19:13:22 +01:00
@pytest.mark.parametrize("package", ["podman", "crun", "slirp4netns"])
def test_podman_installed(host, package):
assert host.package(package).is_installed
2022-03-18 19:13:22 +01:00
def test_podman_run(host):
cmd = host.run("/usr/bin/podman info")
2022-06-21 11:27:50 +02:00
assert "cgroupVersion: v1" in cmd.stdout
2022-03-18 19:13:22 +01:00
assert cmd.succeeded