mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -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
|
@ -22,7 +22,7 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- item.0 | changed
|
||||
- item.0 is changed
|
||||
- item.0.path_value == "C:\\" + item.0.item + "Path"
|
||||
- item.1.stdout_lines[0] == 'C:\\' + item.0.item + 'Path'
|
||||
with_together:
|
||||
|
@ -47,7 +47,7 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- multiout | changed
|
||||
- multiout is changed
|
||||
- multiout.path_value == "C:\\PathZ;C:\\PathA"
|
||||
- varout.stdout_lines[0] == "C:\\PathZ;C:\\PathA"
|
||||
|
||||
|
@ -84,10 +84,10 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- addout | changed
|
||||
- addout is changed
|
||||
- addout.path_value == 'C:\\PathZ;C:\\NewPath;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";%SystemRoot%\stuff'
|
||||
- varout.stdout_lines[0] == ('C:\\PathZ;C:\\NewPath;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";C:\Windows\stuff')
|
||||
- not idemout | changed
|
||||
- idemout is not changed
|
||||
- idemout.path_value == 'C:\\PathZ;C:\\NewPath;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";%SystemRoot%\stuff'
|
||||
- idemvarout.stdout_lines[0] == ('C:\\PathZ;C:\\NewPath;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";C:\Windows\stuff')
|
||||
|
||||
|
@ -116,10 +116,10 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- removeout | changed
|
||||
- removeout is changed
|
||||
- removeout.path_value == 'C:\\PathZ;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";%SystemRoot%\stuff'
|
||||
- varout.stdout_lines[0] == 'C:\\PathZ;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";C:\Windows\stuff'
|
||||
- not idemremoveout | changed
|
||||
- idemremoveout is not changed
|
||||
- idemremoveout.path_value == 'C:\\PathZ;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";%SystemRoot%\stuff'
|
||||
- idemvarout.stdout_lines[0] == 'C:\\PathZ;C:\\PathA;C:\\PathWithTrailingBackslash\\;"C:\Quoted;With;Semicolons";C:\Windows\stuff'
|
||||
|
||||
|
@ -141,7 +141,7 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- removeout | changed
|
||||
- removeout is changed
|
||||
- removeout.path_value == "C:\\PathA"
|
||||
- varout.stdout_lines[0] == "C:\\PathA"
|
||||
|
||||
|
@ -172,10 +172,10 @@
|
|||
- name: Ensure output
|
||||
assert:
|
||||
that:
|
||||
- checkadd | changed
|
||||
- checkadd is changed
|
||||
- checkadd.path_value == "C:\\PathA;C:\\MissingPath"
|
||||
- checkaddvarout.stdout_lines[0] == "C:\\PathA" # shouldn't have actually changed the value
|
||||
- checkremove | changed
|
||||
- checkremove is changed
|
||||
- checkremove.path_value == ""
|
||||
- checkremovevarout.stdout_lines[0] == "C:\\PathA" # shouldn't have actually changed the value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue