Skip to content
Snippets Groups Projects
Unverified Commit 11d98c6b authored by Varac's avatar Varac
Browse files

Fix cert check

parent 00f6ec59
Branches
Tags
No related merge requests found
......@@ -12,7 +12,7 @@ from OpenSSL import SSL
@pytest.mark.resource
@pytest.mark.certs
def test_cert_validation(host, app): # pylint: disable=too-many-statements
def test_cert_validation(host, resource): # pylint: disable=too-many-statements
"""Checks for proper cluster certs from exposed services.
Check is executed on the local provisioning machine.
"""
......@@ -103,13 +103,13 @@ def test_cert_validation(host, app): # pylint: disable=too-many-statements
'wordpress': 'www'
}
if app == 'all':
if resource == 'all':
apps = list(app_subdomains.keys())
elif app == 'kube-prometheus-stack':
elif resource == 'kube-prometheus-stack':
apps = ['grafana', 'prometheus']
else:
assert app in app_subdomains, "Error: Unknown app: {}".format(app)
apps = [app]
assert resource in app_subdomains, "Error: Unknown app: {}".format(app)
apps = [resource]
print('\n')
for app_name in apps:
......@@ -127,4 +127,4 @@ def test_cert_validation(host, app): # pylint: disable=too-many-statements
['pytest/le-staging-bundle.pem'])
fqdn = app_subdomains[app_name] + '.' + domain
assert valid_cert(domain=fqdn, app=app)
assert valid_cert(domain=fqdn, app=resource)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment