From 86465ec8d41b39812a98f8f0a5cd1c0c5484964e Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Fri, 13 Sep 2019 15:08:33 +0200 Subject: [PATCH] Remove extra CI variable substitution --- .gitlab-ci.yml | 2 -- test/README.md | 6 +++--- test/pytest/test_certs.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e2d6f596..bdd63d4da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -104,8 +104,6 @@ testinfra: certs: stage: health-test - variables: - OAS_DOMAIN: "$ADDRESS" allow_failure: true script: - mkdir ~/.ssh diff --git a/test/README.md b/test/README.md index 21ceee2fa..5ff076a3f 100644 --- a/test/README.md +++ b/test/README.md @@ -10,7 +10,7 @@ Specify host manually: Run cert test manually using the ansible inventory file: - OAS_DOMAIN='example.openappstack.net' py.test -v -m 'certs' \ + ADDRESS='example.openappstack.net' py.test -v -m 'certs' \ --connection=ansible \ --ansible-inventory=../ansible/inventory.yml \ --hosts='ansible://*' @@ -18,11 +18,11 @@ Run cert test manually using the ansible inventory file: Run cert test manually against a different cluster, not configured in any ansible inventory file, either by using pytest: - OAS_DOMAIN='example.openappstack.net' py.test -v -m 'certs' + ADDRESS='example.openappstack.net' py.test -v -m 'certs' or directly (allows better debugging since pytest won't eat stdout): - OAS_DOMAIN='example.openappstack.net' pytest/test_certs.py + ADDRESS='example.openappstack.net' pytest/test_certs.py ## Issues diff --git a/test/pytest/test_certs.py b/test/pytest/test_certs.py index 2e9c152b3..472311e16 100755 --- a/test/pytest/test_certs.py +++ b/test/pytest/test_certs.py @@ -97,8 +97,8 @@ def valid_cert(domain: str, ca_file: str = '/tmp/custom_ca_bundle.crt'): @pytest.mark.certs def test_cert_validation(host): - domain = os.environ.get("OAS_DOMAIN") - assert domain, "Please export OAS_DOMAIN as environment variable." + domain = os.environ.get("ADDRESS") + assert domain, "Please export ADDRESS as environment variable." add_custom_cert_authorities(certifi.where(), ['pytest/le-staging-bundle.pem']) -- GitLab