Install useful packages
This commit is contained in:
parent
c9a3cc13ed
commit
6145fc6e09
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import pytest
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
|
@ -6,9 +7,9 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
f = host.file('/etc/hosts')
|
||||
|
||||
assert f.exists
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
||||
@pytest.mark.parametrize(
|
||||
'package_name',
|
||||
['bash-completion', 'colordiff', 'curl', 'less', 'vim'],
|
||||
)
|
||||
def test_packages(host, package_name):
|
||||
assert host.package(package_name).is_installed
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
---
|
||||
- name: Install useful packages
|
||||
apt:
|
||||
update_cache: true
|
||||
name: ['bash-completion', 'colordiff', 'curl', 'less', 'vim']
|
||||
|
|
Loading…
Reference in New Issue