mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 23:00:02 -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
|
@ -71,8 +71,8 @@
|
|||
- name: validate results
|
||||
assert:
|
||||
that:
|
||||
- sysctl_test0 | changed
|
||||
- not sysctl_test1 | changed
|
||||
- sysctl_test0 is changed
|
||||
- sysctl_test1 is not changed
|
||||
- 'sysctl_content0.stdout_lines[sysctl_content0.stdout_lines.index("vm.swappiness=5")] == "vm.swappiness=5"'
|
||||
|
||||
- name: Remove kernel.panic
|
||||
|
@ -98,7 +98,7 @@
|
|||
- name: Validate results for key removal
|
||||
assert:
|
||||
that:
|
||||
- sysctl_test2 | changed
|
||||
- sysctl_test2 is changed
|
||||
- "'kernel.panic' not in sysctl_content2.stdout_lines"
|
||||
|
||||
- name: Test remove kernel.panic again
|
||||
|
@ -113,7 +113,7 @@
|
|||
- name: Assert that no change was made
|
||||
assert:
|
||||
that:
|
||||
- not sysctl_test2_change_test | changed
|
||||
- sysctl_test2_change_test is not changed
|
||||
|
||||
##
|
||||
## sysctl - sysctl_set
|
||||
|
@ -141,7 +141,7 @@
|
|||
- name: validate results for test 3
|
||||
assert:
|
||||
that:
|
||||
- sysctl_test3 | changed
|
||||
- sysctl_test3 is changed
|
||||
- 'sysctl_check3.stdout_lines == ["net.ipv4.ip_forward = 1"]'
|
||||
|
||||
- name: Try sysctl with no name
|
||||
|
@ -155,7 +155,7 @@
|
|||
- name: validate nameless results
|
||||
assert:
|
||||
that:
|
||||
- sysctl_no_name | failed
|
||||
- sysctl_no_name is failed
|
||||
- "sysctl_no_name.msg == 'name cannot be None'"
|
||||
|
||||
- name: Try sysctl with no value
|
||||
|
@ -169,5 +169,5 @@
|
|||
- name: validate nameless results
|
||||
assert:
|
||||
that:
|
||||
- sysctl_no_value | failed
|
||||
- sysctl_no_value is failed
|
||||
- "sysctl_no_value.msg == 'value cannot be None'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue