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

19 lines
400 B
Python

import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
def test_podman_installed(host):
assert host.package("podman").is_installed
def test_podman_run(host):
cmd = host.run("/usr/bin/podman info")
assert "cgroupVersion: v2" in cmd.stdout
assert cmd.succeeded