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

- Use SystemInfo to determine to OS type (instead of using the facts from the...

- Use SystemInfo to determine to OS type (instead of using the facts from the Ansbile module and the Testinfra backend module, which is just ugly code).
parent 7547c3f2
No related branches found
No related tags found
No related merge requests found
......@@ -30,17 +30,11 @@ def test_concat_cert(File, Command):
'grep BEGIN /usr/share/ca-certificates/*.crt | wc -l').stdout
def test_update_ca_certificates(File, Ansible, Command, Sudo,
TestinfraBackend):
connection = TestinfraBackend.get_connection_type()
if connection == 'docker':
filename = '/usr/sbin/update-ca-certificates'
elif connection == 'ansible':
ansible_os_family = Ansible('setup')['ansible_facts'][
'ansible_os_family']
if ansible_os_family == 'OpenBSD':
def test_update_ca_certificates(File, SystemInfo, Command, Sudo):
if SystemInfo.type == 'openbsd':
filename = '/usr/local/sbin/update-ca-certificates'
else:
elif SystemInfo.type == 'linux' and SystemInfo.distribution in ['debian',
'ubuntu']:
filename = '/usr/sbin/update-ca-certificates'
update_ca_certificates = File(filename)
assert update_ca_certificates.is_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment