Debian Codegraph @

ansible_collections/community/zabbix/molecule/zabbix_javagateway/tests/test_default.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']).get_hosts('all')
7
8
9 def test_zabbix_running_and_enabled(host):
10 zabbix = host.service("zabbix-java-gateway")
11 assert zabbix.is_running
12
13
14 def test_zabbix_java_gateway_dot_conf(host):
15 zabbix_proxy_conf = host.file("/etc/zabbix/zabbix_java_gateway.conf")
16 assert zabbix_proxy_conf.user == "zabbix"
17 assert zabbix_proxy_conf.group == "zabbix"
18 assert zabbix_proxy_conf.mode == 0o644
19
20 assert zabbix_proxy_conf.contains("LISTEN_IP=0.0.0.0")
21 assert zabbix_proxy_conf.contains("LISTEN_PORT=10052")
22 assert zabbix_proxy_conf.contains("PID_FILE=/run/zabbix/zabbix_java_gateway.pid")
23 assert zabbix_proxy_conf.contains("START_POLLERS=5")