mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Switch test_lookups to badssl/local testing. (#16466)
* Switch test_lookups to badssl/local testing. * Use var for checking badssl host content.
This commit is contained in:
parent
1e628761a2
commit
394430a61e
4 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
- prepare_http_tests
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in a new issue