19 lines
499 B
Python
19 lines
499 B
Python
|
"""Role testing files using testinfra."""
|
||
|
import pytest
|
||
|
|
||
|
def test_installed_packages(host):
|
||
|
collectd = host.package("collectd-core")
|
||
|
assert collectd.is_installed
|
||
|
|
||
|
def test_config(host):
|
||
|
collectd_config = host.file("/etc/collectd/collectd.conf")
|
||
|
assert collectd_config.exists
|
||
|
|
||
|
dtypes = host.file("/usr/share/collectd/types.db")
|
||
|
assert dtypes.exists
|
||
|
|
||
|
def test_service(host):
|
||
|
collectd = host.service("collectd")
|
||
|
assert collectd.is_enabled
|
||
|
assert collectd.is_running
|