Skip to content
Snippets Groups Projects
test_default.py 519 B
Newer Older
Remy Mudingay's avatar
Remy Mudingay committed
import os
import testinfra.utils.ansible_runner
import testinfra

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')

Remy Mudingay's avatar
Remy Mudingay committed
def test_tinyproxy_is_installed(host):
    tinyproxy = host.package("tinyproxy")
Remy Mudingay's avatar
Remy Mudingay committed
    assert tinyproxy.is_installed
    assert tinyproxy.version.startswith("1.11.1")
Remy Mudingay's avatar
Remy Mudingay committed


def test_tinyproxy_running_and_enabled(host):
Remy Mudingay's avatar
Remy Mudingay committed
    tinyproxy = host.service("tinyproxy.service")
Remy Mudingay's avatar
Remy Mudingay committed
    assert tinyproxy.is_running
    assert tinyproxy.is_enabled