Switch to a different url for testing SNI right now. (#15798)

This commit is contained in:
Toshio Kuratomi 2016-05-10 07:08:47 -07:00 committed by Toshio Kuratomi
parent 6f99f40f37
commit d2e8e8d6a7
2 changed files with 16 additions and 6 deletions

View file

@ -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

View file

@ -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"