diff --git a/test/integration/roles/prepare_http_tests/defaults/main.yml b/test/integration/roles/prepare_http_tests/defaults/main.yml index c41faa2bd39..1114729623b 100644 --- a/test/integration/roles/prepare_http_tests/defaults/main.yml +++ b/test/integration/roles/prepare_http_tests/defaults/main.yml @@ -1,3 +1,4 @@ badssl_host: wrong.host.badssl.com httpbin_host: httpbin.org sni_host: sni.velox.ch +badssl_host_substring: wrong.host.badssl.com diff --git a/test/integration/roles/prepare_http_tests/vars/httptester.yml b/test/integration/roles/prepare_http_tests/vars/httptester.yml index e5f46db6304..0e23ae936aa 100644 --- a/test/integration/roles/prepare_http_tests/vars/httptester.yml +++ b/test/integration/roles/prepare_http_tests/vars/httptester.yml @@ -2,3 +2,4 @@ badssl_host: fail.ansible.http.tests httpbin_host: ansible.http.tests sni_host: sni1.ansible.http.tests +badssl_host_substring: HTTP Client Testing Service diff --git a/test/integration/roles/test_lookups/meta/main.yml b/test/integration/roles/test_lookups/meta/main.yml index 1050c23ce30..ee75ae6e657 100644 --- a/test/integration/roles/test_lookups/meta/main.yml +++ b/test/integration/roles/test_lookups/meta/main.yml @@ -1,3 +1,4 @@ dependencies: - prepare_tests + - prepare_http_tests diff --git a/test/integration/roles/test_lookups/tasks/main.yml b/test/integration/roles/test_lookups/tasks/main.yml index 556f23e0441..9539c45feb9 100644 --- a/test/integration/roles/test_lookups/tasks/main.yml +++ b/test/integration/roles/test_lookups/tasks/main.yml @@ -231,7 +231,7 @@ - name: Test that retrieving a url with invalid cert fails set_fact: - web_data: "{{ lookup('url', 'https://www.kennethreitz.org/') }}" + web_data: "{{ lookup('url', 'https://{{ badssl_host }}/') }}" ignore_errors: True register: url_invalid_cert @@ -242,12 +242,12 @@ - name: Test that retrieving a url with invalid cert with validate_certs=False works set_fact: - web_data: "{{ lookup('url', 'https://www.kennethreitz.org/', validate_certs=False) }}" + web_data: "{{ lookup('url', 'https://{{ badssl_host }}/', validate_certs=False) }}" register: url_no_validate_cert - assert: that: - - "'www.kennethreitz.org' in web_data" + - "'{{ badssl_host_substring }}' in web_data" - name: Test cartesian lookup debug: var={{item}}