mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Switch to a different url for testing SNI right now. (#15798)
This commit is contained in:
parent
30decd5e0a
commit
7ccb08cc7e
2 changed files with 16 additions and 6 deletions
|
@ -211,9 +211,13 @@
|
|||
set_fact:
|
||||
is_ubuntu_precise: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise' }}"
|
||||
|
||||
# These tests are just side effects of how the site is hosted. It's not
|
||||
# specifically a test site. So the tests may break due to the hosting
|
||||
# changing. Eventually we need to standup a webserver with SNI as part of the
|
||||
# test run.
|
||||
- name: Test that SNI succeeds on python versions that have SNI
|
||||
uri:
|
||||
url: 'https://sni.velox.ch'
|
||||
url: "{{ SNI_URI }}"
|
||||
return_content: true
|
||||
when: ansible_python.has_sslcontext
|
||||
register: result
|
||||
|
@ -221,13 +225,13 @@
|
|||
- name: Assert SNI verification succeeds on new python
|
||||
assert:
|
||||
that:
|
||||
- result|success
|
||||
- '"Great! Your client" in result.content'
|
||||
- result|success
|
||||
- "\"<h2>If You Can Read This, You're SNIing</h2>\" in result.content"
|
||||
when: ansible_python.has_sslcontext
|
||||
|
||||
- name: Verify SNI verification fails on old python without urllib3 contrib
|
||||
uri:
|
||||
url: 'https://sni.velox.ch'
|
||||
url: '{{ SNI_URI }}'
|
||||
ignore_errors: true
|
||||
when: not ansible_python.has_sslcontext
|
||||
register: result
|
||||
|
@ -253,7 +257,7 @@
|
|||
|
||||
- name: Verify SNI verificaiton succeeds on old python with urllib3 contrib
|
||||
uri:
|
||||
url: 'https://sni.velox.ch'
|
||||
url: '{{ SNI_URI }}'
|
||||
return_content: true
|
||||
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
||||
register: result
|
||||
|
@ -262,7 +266,8 @@
|
|||
assert:
|
||||
that:
|
||||
- result|success
|
||||
- '"Great! Your client" in result.content'
|
||||
#- '"Great! Your client" in result.content'
|
||||
- "\"<h2>If You Can Read This, You're SNIing</h2>\" in result.content"
|
||||
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
||||
|
||||
- name: Uninstall ndg-httpsclient and urllib3
|
||||
|
|
|
@ -7,3 +7,8 @@ uri_os_packages:
|
|||
- python-pyasn1
|
||||
- python-openssl
|
||||
- python-urllib3
|
||||
|
||||
# Needs to be a url to a site that is hosted using SNI.
|
||||
# Eventually we should make this a test server that we stand up as part of the test run.
|
||||
#SNI_URI: 'https://sni.velox.ch'
|
||||
SNI_URI: "https://www.mnot.net/blog/2014/05/09/if_you_can_read_this_youre_sniing"
|
||||
|
|
Loading…
Reference in a new issue