Skip to content
Snippets Groups Projects
Commit accc77ab authored by nimrod's avatar nimrod
Browse files

- Seperated tests.

parent 3c26d3ba
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,19 @@ from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_unattended_upgrades(Service, Package, File, Command):
assert Package('unattended-upgrades').is_installed
def test_unattended_upgrades_service(Service):
assert Service('unattended-upgrades').is_enabled
def test_unattended_upgrades_package(Package):
assert Package('unattended-upgrades').is_installed
def test_unattended_upgrades_config(File):
assert File('/etc/apt/apt.conf.d/50unattended-upgrades').is_file
assert File('/etc/apt/apt.conf.d/02periodic').is_file
def test_unattended_upgrades_dry_run(Command, Sudo):
with Sudo():
assert Command('/usr/bin/unattended-upgrade --dry-run').rc == 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment