mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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:
parent
fd4a6cf7ad
commit
4fe08441be
349 changed files with 4086 additions and 3844 deletions
|
@ -23,8 +23,8 @@
|
|||
- name: check win_ping result
|
||||
assert:
|
||||
that:
|
||||
- not win_ping_result|failed
|
||||
- not win_ping_result|changed
|
||||
- win_ping_result is not failed
|
||||
- win_ping_result is not changed
|
||||
- win_ping_result.ping == 'pong'
|
||||
|
||||
- name: test win_ping with data
|
||||
|
@ -35,8 +35,8 @@
|
|||
- name: check win_ping result with data
|
||||
assert:
|
||||
that:
|
||||
- not win_ping_with_data_result|failed
|
||||
- not win_ping_with_data_result|changed
|
||||
- win_ping_with_data_result is not failed
|
||||
- win_ping_with_data_result is not changed
|
||||
- win_ping_with_data_result.ping == '☠'
|
||||
|
||||
- name: test win_ping.ps1 with data as complex args
|
||||
|
@ -47,8 +47,8 @@
|
|||
- name: check win_ping.ps1 result with data
|
||||
assert:
|
||||
that:
|
||||
- not win_ping_ps1_result|failed
|
||||
- not win_ping_ps1_result|changed
|
||||
- win_ping_ps1_result is not failed
|
||||
- win_ping_ps1_result is not changed
|
||||
- win_ping_ps1_result.ping == 'bleep'
|
||||
|
||||
- name: test win_ping with extra args to verify that v2 module replacer escaping works as expected
|
||||
|
@ -77,8 +77,8 @@
|
|||
- name: check that win_ping with extra args succeeds and ignores everything except data
|
||||
assert:
|
||||
that:
|
||||
- not win_ping_extra_args_result|failed
|
||||
- not win_ping_extra_args_result|changed
|
||||
- win_ping_extra_args_result is not failed
|
||||
- win_ping_extra_args_result is not changed
|
||||
- win_ping_extra_args_result.ping == 'bloop'
|
||||
|
||||
- name: test win_ping using data=crash so that it throws an exception
|
||||
|
@ -90,8 +90,8 @@
|
|||
- name: check win_ping_crash result
|
||||
assert:
|
||||
that:
|
||||
- win_ping_crash_result|failed
|
||||
- not win_ping_crash_result|changed
|
||||
- win_ping_crash_result is failed
|
||||
- win_ping_crash_result is not changed
|
||||
- "'FullyQualifiedErrorId : boom' in win_ping_crash_result.module_stderr"
|
||||
|
||||
# TODO: fix code or tests? discrete error returns from PS are strange...
|
||||
|
@ -104,8 +104,8 @@
|
|||
#- name: check win_ping_throw result
|
||||
# assert:
|
||||
# that:
|
||||
# - win_ping_throw_result|failed
|
||||
# - not win_ping_throw_result|changed
|
||||
# - win_ping_throw_result is failed
|
||||
# - win_ping_throw_result is not changed
|
||||
# - win_ping_throw_result.msg == 'MODULE FAILURE'
|
||||
# - win_ping_throw_result.exception
|
||||
# - win_ping_throw_result.error_record
|
||||
|
@ -118,8 +118,8 @@
|
|||
#- name: check win_ping_throw_string result
|
||||
# assert:
|
||||
# that:
|
||||
# - win_ping_throw_string_result|failed
|
||||
# - not win_ping_throw_string_result|changed
|
||||
# - win_ping_throw_string_result is failed
|
||||
# - win_ping_throw_string_result is not changed
|
||||
# - win_ping_throw_string_result.msg == 'no ping for you'
|
||||
# - win_ping_throw_string_result.exception
|
||||
# - win_ping_throw_string_result.error_record
|
||||
|
@ -132,8 +132,8 @@
|
|||
#- name: check win_ping_syntax_error result
|
||||
# assert:
|
||||
# that:
|
||||
# - win_ping_syntax_error_result|failed
|
||||
# - not win_ping_syntax_error_result|changed
|
||||
# - win_ping_syntax_error_result is failed
|
||||
# - win_ping_syntax_error_result is not changed
|
||||
# - win_ping_syntax_error_result.msg
|
||||
# - win_ping_syntax_error_result.exception
|
||||
#
|
||||
|
@ -145,8 +145,8 @@
|
|||
#- name: check win_ping_strict_mode_error result
|
||||
# assert:
|
||||
# that:
|
||||
# - win_ping_strict_mode_error_result|failed
|
||||
# - not win_ping_strict_mode_error_result|changed
|
||||
# - win_ping_strict_mode_error_result is failed
|
||||
# - win_ping_strict_mode_error_result is not changed
|
||||
# - win_ping_strict_mode_error_result.msg
|
||||
# - win_ping_strict_mode_error_result.exception
|
||||
#
|
||||
|
@ -157,6 +157,6 @@
|
|||
#- name: check win_ping_set_attr_result result
|
||||
# assert:
|
||||
# that:
|
||||
# - not win_ping_set_attr_result|failed
|
||||
# - not win_ping_set_attr_result|changed
|
||||
# - win_ping_set_attr_result is not failed
|
||||
# - win_ping_set_attr_result is not changed
|
||||
# - win_ping_set_attr_result.ping == 'fixed'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue