mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Merge branch 'devel' into devel_switch_v2
This commit is contained in:
commit
e547e1f9ba
8 changed files with 125 additions and 6 deletions
3
test/integration/roles/prepare_win_tests/meta/main.yml
Normal file
3
test/integration/roles/prepare_win_tests/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
|
||||
allow_duplicates: yes
|
|
@ -26,7 +26,7 @@
|
|||
- result.changed
|
||||
- '"OK" in result.msg'
|
||||
|
||||
- name: test https fetch to a site with invalid domain
|
||||
- name: test https fetch to a site with mismatched hostname and certificate
|
||||
get_url:
|
||||
url: "https://kennethreitz.org/"
|
||||
dest: "{{ output_dir }}/shouldnotexist.html"
|
||||
|
@ -37,11 +37,26 @@
|
|||
path: "{{ output_dir }}/shouldnotexist.html"
|
||||
register: stat_result
|
||||
|
||||
- debug: var=result
|
||||
|
||||
- name: Assert that the file was not downloaded
|
||||
assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "'Certificate does not belong to ' in result.msg"
|
||||
- "stat_result.stat.exists == false"
|
||||
|
||||
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
|
||||
get_url:
|
||||
url: "https://kennethreitz.org/"
|
||||
dest: "{{ output_dir }}/kreitz.html"
|
||||
validate_certs: no
|
||||
register: result
|
||||
|
||||
- stat:
|
||||
path: "{{ output_dir }}/kreitz.html"
|
||||
register: stat_result
|
||||
|
||||
- name: Assert that the file was downloaded
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "stat_result.stat.exists == true"
|
||||
|
|
|
@ -91,3 +91,38 @@
|
|||
with_together:
|
||||
- fail_checksum.results
|
||||
- fail.results
|
||||
|
||||
- name: test https fetch to a site with mismatched hostname and certificate
|
||||
uri:
|
||||
url: "https://kennethreitz.org/"
|
||||
dest: "{{ output_dir }}/shouldnotexist.html"
|
||||
ignore_errors: True
|
||||
register: result
|
||||
|
||||
- stat:
|
||||
path: "{{ output_dir }}/shouldnotexist.html"
|
||||
register: stat_result
|
||||
|
||||
- name: Assert that the file was not downloaded
|
||||
assert:
|
||||
that:
|
||||
- "result.failed == true"
|
||||
- "'certificate does not match ' in result.msg"
|
||||
- "stat_result.stat.exists == false"
|
||||
|
||||
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
|
||||
get_url:
|
||||
url: "https://kennethreitz.org/"
|
||||
dest: "{{ output_dir }}/kreitz.html"
|
||||
validate_certs: no
|
||||
register: result
|
||||
|
||||
- stat:
|
||||
path: "{{ output_dir }}/kreitz.html"
|
||||
register: stat_result
|
||||
|
||||
- name: Assert that the file was downloaded
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "stat_result.stat.exists == true"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
- hosts: windows
|
||||
gather_facts: false
|
||||
max_fail_percentage: 1
|
||||
roles:
|
||||
- { role: test_win_raw, tags: test_win_raw }
|
||||
- { role: test_win_script, tags: test_win_script }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue