forked from ome/prod-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efd4d1f
commit 98f4036
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
import pytest | ||
import testinfra.utils.ansible_runner | ||
|
||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( | ||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') | ||
|
||
OMERO = '/opt/omero/server/OMERO.server/bin/omero' | ||
OMERO_LOGIN = '-C -s localhost -u root -w omero' | ||
|
||
|
||
@pytest.mark.parametrize("name", [ | ||
'nginx', | ||
'omero-server', | ||
'omero-web', | ||
'postgresql-16', | ||
]) | ||
def test_service_running_and_enabled(host, name): | ||
service = host.service(name) | ||
assert service.is_running | ||
assert service.is_enabled | ||
|
||
|
||
def test_omero_login(host): | ||
with host.sudo('omero-server'): | ||
host.check_output( | ||
'/opt/omero/server/OMERO.server/bin/omero ' | ||
'login -C -s localhost -u root -w omero') | ||
|
||
|
||
def test_omero_nginx_ssl(host): | ||
out = host.check_output('curl -fkI https://localhost/') | ||
assert 'Location: /webclient/' in out |