Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch test_lookups to badssl/local testing. #16466

Merged
merged 2 commits into from
Jun 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions test/integration/roles/test_lookups/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dependencies:
- prepare_tests
- prepare_http_tests

6 changes: 3 additions & 3 deletions test/integration/roles/test_lookups/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}}
Expand Down