blob: d4314e5685275096298a8a29f77ec0fcac4144d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@pytest.mark.parametrize('cert_file', [
'rootCA.crt'
])
def test_cert_file_installed(host, cert_file):
os = host.system_info.distribution
if os == "centos":
f = host.file('/etc/pki/ca-trust/source/anchors/' + cert_file)
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
|