Fix github_issue test and enable in CI.
This commit is contained in:
parent
6e79dfb5f3
commit
a7d5492ea3
9 changed files with 27 additions and 4 deletions
|
@ -112,7 +112,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "result|failed"
|
||||
- "'Failed to validate the SSL certificate' in result.msg"
|
||||
- "'Failed to validate the SSL certificate' in result.msg or (result.msg | match('hostname .* doesn.t match .*'))"
|
||||
- "stat_result.stat.exists == false"
|
||||
|
||||
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
destructive
|
||||
posix/ci/group1
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
- name: install py27-requests to avoid install via pip later
|
||||
package:
|
||||
name: py27-requests
|
|
@ -0,0 +1 @@
|
|||
# nothing to do here, allow requests to be installed by pip later
|
|
@ -0,0 +1,3 @@
|
|||
- name: install python-requests to avoid install via pip later
|
||||
package:
|
||||
name: python-requests
|
|
@ -0,0 +1,3 @@
|
|||
- name: install python3-requests to avoid install via pip later
|
||||
package:
|
||||
name: python3-requests
|
|
@ -17,6 +17,11 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
- name: make sure github3.py is not installed
|
||||
pip:
|
||||
name: github3.py
|
||||
state: absent
|
||||
|
||||
# Testcase 0001: Check if dependency is installed
|
||||
- name: Check if github3.py is installed or not
|
||||
github_issue:
|
||||
|
@ -33,10 +38,17 @@
|
|||
- "{{ lib_missing.changed == False }}"
|
||||
- "{{ 'Missing required github3 module.' in lib_missing.msg }}"
|
||||
|
||||
- include: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}-python{{ ansible_python_version.split(".")[0] }}.yml'
|
||||
- '{{ ansible_distribution }}-python{{ ansible_python_version.split(".")[0] }}.yml'
|
||||
- '{{ ansible_os_family }}-python{{ ansible_python_version.split(".")[0] }}.yml'
|
||||
- 'default-python{{ ansible_python_version.split(".")[0] }}.yml'
|
||||
|
||||
- name: make sure github3.py is installed
|
||||
pip:
|
||||
name: github3.py
|
||||
state: latest
|
||||
|
||||
# Testcase 0002: Check if issue exists
|
||||
- name: Check if GitHub issue is closed or not
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- "url_invalid_cert.failed"
|
||||
- "'Error validating the server' in url_invalid_cert.msg"
|
||||
- "'Error validating the server' in url_invalid_cert.msg or (url_invalid_cert.msg | search('hostname .* doesn.t match .*'))"
|
||||
|
||||
- name: Test that retrieving a url with invalid cert with validate_certs=False works
|
||||
set_fact:
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "'Failed to validate the SSL certificate' in result.msg"
|
||||
- "'Failed to validate the SSL certificate' in result.msg or (result.msg | match('hostname .* doesn.t match .*'))"
|
||||
- "stat_result.stat.exists == false"
|
||||
|
||||
- name: Clean up any cruft from the results directory
|
||||
|
|
Loading…
Reference in a new issue