You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
558 B

  1. import os
  2. import testinfra.utils.ansible_runner
  3. testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
  4. os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
  5. def test_service(host):
  6. svc = host.service("crio")
  7. assert svc.is_running
  8. assert svc.is_enabled
  9. def test_run(host):
  10. crictl = "/usr/local/bin/crictl"
  11. path = "unix:///var/run/crio/crio.sock"
  12. with host.sudo():
  13. cmd = host.command(crictl + " --runtime-endpoint " + path + " version")
  14. assert cmd.rc == 0
  15. assert "RuntimeName: cri-o" in cmd.stdout