From 11d98c6b5d6b7493941b39541243e25d78d8ea6b Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Thu, 29 Jul 2021 23:52:13 +0200 Subject: [PATCH] Fix cert check --- test/pytest/test_certs.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/pytest/test_certs.py b/test/pytest/test_certs.py index 427f6bd44..5343122ec 100755 --- a/test/pytest/test_certs.py +++ b/test/pytest/test_certs.py @@ -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) -- GitLab