Add testinfra test for ntp

Change-Id: If7b5215edea93d272dc1d0344839756d9f43b2ac
This commit is contained in:
James E. Blair 2018-08-24 08:26:29 -07:00
parent b3b698c6ff
commit 6ec51b4d00

View File

@ -68,3 +68,15 @@ def test_iptables(host):
snmp = ('-A openstack-INPUT -s %s/32 -p udp -m udp'
' --dport 161 -j ACCEPT' % ip)
assert snmp in rules
def test_ntp(host):
package = host.package("ntp")
assert package.is_installed
if host.system_info.distribution in ['ubuntu', 'debian']:
service = host.service("ntp")
else:
service = host.service("ntpd")
assert service.is_running
assert service.is_enabled