xoxys.firewalld/molecule/default/tests/test_default.py
Robert Kaussow 090f5b5c7a
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/docs unknown status
ci/woodpecker/push/notify Pipeline was successful
ci: migrate to woodpecker
2024-02-18 12:32:10 +01:00

19 lines
443 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_firewalld_installed(host):
firewalld = host.package("firewalld")
assert firewalld.is_installed
def test_firewalld_running_and_enabled(host):
firewalld = host.service("firewalld")
assert firewalld.is_running
assert firewalld.is_enabled