Deprecate tests used as filters (#32361)

* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
This commit is contained in:
Matt Martz 2017-11-27 16:58:08 -06:00 committed by ansibot
commit 4fe08441be
349 changed files with 4086 additions and 3844 deletions

View file

@ -111,8 +111,8 @@
- name: Assert that the file was not downloaded
assert:
that:
- "result|failed"
- "'Failed to validate the SSL certificate' in result.msg or (result.msg | match('hostname .* doesn.t match .*'))"
- "result is failed"
- "'Failed to validate the SSL certificate' in result.msg or ( result.msg is 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
@ -156,7 +156,7 @@
- name: Assert that hostname verification failed because SNI is not supported on this version of python
assert:
that:
- 'get_url_result|failed'
- 'get_url_result is failed'
when: "{{ not python_has_ssl_context }}"
# These tests are just side effects of how the site is hosted. It's not
@ -177,14 +177,14 @@
assert:
that:
- 'data_result.rc == 0'
- 'not get_url_result|failed'
- 'get_url_result is not failed'
when: "{{ python_has_ssl_context }}"
# If the client doesn't support SNI then get_url should have failed with a certificate mismatch
- name: Assert that hostname verification failed because SNI is not supported on this version of python
assert:
that:
- 'get_url_result|failed'
- 'get_url_result is failed'
when: "{{ not python_has_ssl_context }}"
# End hacky SNI test section