Skip to content

Commit

Permalink
Only use relevant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pwalczysko committed Nov 19, 2024
1 parent 547d655 commit 477ad56
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions molecule/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
'nginx',
'omero-server',
'omero-web',
'postgresql-13',
'prometheus-node-exporter',
'prometheus-omero-exporter',
'prometheus-postgres-exporter',
'postgresql-16',
])
def test_service_running_and_enabled(host, name):
service = host.service(name)
Expand All @@ -31,33 +28,6 @@ def test_omero_login(host):
'login -C -s localhost -u root -w omero')


@pytest.mark.parametrize("curl", [
'localhost:9449/metrics',
'-u monitoring:monitoring -k https://localhost/metrics/9449',
])
def test_omero_metrics(host, curl):
out = host.check_output('curl -f %s' % curl)
assert 'omero_sessions_active' in out


def test_omero_metrics_auth_fail(host):
out = host.run(
'curl -f -u monitoring:incorrect -k https://localhost/metrics/9449')
assert out.rc == 22
assert '401' in out.stderr


def test_omero_nginx_ssl(host):
out = host.check_output('curl -fkI https://localhost/')
assert 'Location: /webclient/' in out


def test_local_ldap(host):
initialised = host.check_output(
'/home/ldap/ldapmanager get dc=openmicroscopy,dc=org')
if len(initialised.strip()) == 0:
host.check_output('/home/ldap/ldapmanager init')

out = host.check_output(
'/home/ldap/ldapmanager get dc=openmicroscopy,dc=org')
assert 'dn: dc=openmicroscopy,dc=org' in out

0 comments on commit 477ad56

Please sign in to comment.