diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e2d6f5965e4ccdbc0ce7cbfec8795de6419ad26..bdd63d4dac224e1a766afbf4f3f7bccbad31399f 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 21ceee2faf255a4038f21805b4d8079138aa2854..5ff076a3f371fb4decbb77fb44d20e889eb3023a 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 2e9c152b3dd27f0d0e52e250e7bb94485ecb7f0b..472311e1613aca6db185ddb97918beed9e658ee0 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'])