Debian Codegraph @

ansible_collections/community/zabbix/molecule/zabbix_agent_tests/common/tests/test_docker.py

raw
1 import os
2
3 import testinfra.utils.ansible_runner
4
5 testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
6 os.environ["MOLECULE_INVENTORY_FILE"]
7 ).get_hosts("docker")
8
9
10 def test_docker_running(host):
11 zabbixagent = host.docker("zabbix-agent")
12 zabbixagent.is_running
13
14
15 def test_zabbix_include_dir(host):
16 zabbixagent = host.file("/etc/zabbix/zabbix_agentd.d")
17 assert zabbixagent.is_directory
18 assert zabbixagent.user == "root"
19 assert zabbixagent.group == "root"
20 assert zabbixagent.mode == 0o755
21
22
23 def test_socket(host):
24 assert host.socket("tcp://0.0.0.0:10050").is_listening