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
|
@ -26,8 +26,8 @@
|
|||
- "getmac_result.rc == 0"
|
||||
- "getmac_result.stdout"
|
||||
- "not getmac_result.stderr"
|
||||
- "not getmac_result|failed"
|
||||
- "getmac_result|changed"
|
||||
- "getmac_result is not failed"
|
||||
- "getmac_result is changed"
|
||||
|
||||
- name: run ipconfig with /all argument
|
||||
raw: ipconfig /all
|
||||
|
@ -40,8 +40,8 @@
|
|||
- "ipconfig_result.stdout"
|
||||
- "'Physical Address' in ipconfig_result.stdout"
|
||||
- "not ipconfig_result.stderr"
|
||||
- "not ipconfig_result|failed"
|
||||
- "ipconfig_result|changed"
|
||||
- "ipconfig_result is not failed"
|
||||
- "ipconfig_result is changed"
|
||||
|
||||
- name: run ipconfig with invalid argument
|
||||
raw: ipconfig /badswitch
|
||||
|
@ -54,8 +54,8 @@
|
|||
- "ipconfig_invalid_result.rc != 0"
|
||||
- "ipconfig_invalid_result.stdout" # ipconfig displays errors on stdout.
|
||||
# - "not ipconfig_invalid_result.stderr"
|
||||
- "ipconfig_invalid_result|failed"
|
||||
- "ipconfig_invalid_result|changed"
|
||||
- "ipconfig_invalid_result is failed"
|
||||
- "ipconfig_invalid_result is changed"
|
||||
|
||||
- name: run an unknown command
|
||||
raw: uname -a
|
||||
|
@ -68,8 +68,8 @@
|
|||
- "unknown_result.rc != 0"
|
||||
- "not unknown_result.stdout"
|
||||
- "unknown_result.stderr" # An unknown command displays error on stderr.
|
||||
- "unknown_result|failed"
|
||||
- "unknown_result|changed"
|
||||
- "unknown_result is failed"
|
||||
- "unknown_result is changed"
|
||||
|
||||
- name: run a command that takes longer than 60 seconds
|
||||
raw: Start-Sleep -s 75
|
||||
|
@ -81,8 +81,8 @@
|
|||
- "sleep_command.rc == 0"
|
||||
- "not sleep_command.stdout"
|
||||
- "not sleep_command.stderr"
|
||||
- "not sleep_command|failed"
|
||||
- "sleep_command|changed"
|
||||
- "sleep_command is not failed"
|
||||
- "sleep_command is changed"
|
||||
|
||||
- name: run a raw command with key=value arguments
|
||||
raw: echo wwe=raw
|
||||
|
@ -113,7 +113,7 @@
|
|||
- name: check raw + with_items result
|
||||
assert:
|
||||
that:
|
||||
- "not raw_with_items_result|failed"
|
||||
- "raw_with_items_result is not failed"
|
||||
- "raw_with_items_result.results|length == 32"
|
||||
|
||||
# TODO: this test fails, since we're back to passing raw commands without modification
|
||||
|
@ -124,5 +124,5 @@
|
|||
#- name: check raw with job result
|
||||
# assert:
|
||||
# that:
|
||||
# - raw_job_result | succeeded
|
||||
# - raw_job_result is successful
|
||||
# - raw_job_result.stdout_lines[0] == 'yo'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue