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:
|
set_fact:
|
||||||
is_ubuntu_precise: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise' }}"
|
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
|
- name: Test that SNI succeeds on python versions that have SNI
|
||||||
uri:
|
uri:
|
||||||
url: 'https://sni.velox.ch'
|
url: "{{ SNI_URI }}"
|
||||||
return_content: true
|
return_content: true
|
||||||
when: ansible_python.has_sslcontext
|
when: ansible_python.has_sslcontext
|
||||||
register: result
|
register: result
|
||||||
|
@ -221,13 +225,13 @@
|
||||||
- name: Assert SNI verification succeeds on new python
|
- name: Assert SNI verification succeeds on new python
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result|success
|
- result|success
|
||||||
- '"Great! Your client" in result.content'
|
- "\"<h2>If You Can Read This, You're SNIing</h2>\" in result.content"
|
||||||
when: ansible_python.has_sslcontext
|
when: ansible_python.has_sslcontext
|
||||||
|
|
||||||
- name: Verify SNI verification fails on old python without urllib3 contrib
|
- name: Verify SNI verification fails on old python without urllib3 contrib
|
||||||
uri:
|
uri:
|
||||||
url: 'https://sni.velox.ch'
|
url: '{{ SNI_URI }}'
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: not ansible_python.has_sslcontext
|
when: not ansible_python.has_sslcontext
|
||||||
register: result
|
register: result
|
||||||
|
@ -253,7 +257,7 @@
|
||||||
|
|
||||||
- name: Verify SNI verificaiton succeeds on old python with urllib3 contrib
|
- name: Verify SNI verificaiton succeeds on old python with urllib3 contrib
|
||||||
uri:
|
uri:
|
||||||
url: 'https://sni.velox.ch'
|
url: '{{ SNI_URI }}'
|
||||||
return_content: true
|
return_content: true
|
||||||
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
||||||
register: result
|
register: result
|
||||||
|
@ -262,7 +266,8 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result|success
|
- 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
|
when: not ansible_python.has_sslcontext and not is_ubuntu_precise|bool
|
||||||
|
|
||||||
- name: Uninstall ndg-httpsclient and urllib3
|
- name: Uninstall ndg-httpsclient and urllib3
|
||||||
|
|
|
@ -7,3 +7,8 @@ uri_os_packages:
|
||||||
- python-pyasn1
|
- python-pyasn1
|
||||||
- python-openssl
|
- python-openssl
|
||||||
- python-urllib3
|
- 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