2021-08-18 09:53:35 +00:00
|
|
|
import os, re
|
|
|
|
import testinfra.utils.ansible_runner
|
|
|
|
|
|
|
|
def test_packages(host):
|
2024-05-07 19:59:11 +00:00
|
|
|
package = host.package('icingaweb2')
|
|
|
|
assert package.is_installed
|
2021-08-18 09:53:35 +00:00
|
|
|
|
|
|
|
def test_service(host):
|
|
|
|
service = host.service('apache2')
|
|
|
|
assert service.is_running
|
|
|
|
assert service.is_enabled
|
|
|
|
|
|
|
|
def test_http_access(host):
|
|
|
|
cmd = host.run('curl -v http://127.0.0.1/icingaweb2/')
|
|
|
|
assert cmd.succeeded
|
|
|
|
assert 'Location: /icingaweb2/authentication/login' in cmd.stderr
|