mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-23 04:24:00 -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
|
@ -60,9 +60,9 @@
|
|||
- name: check mode ADD assert that a change is needed, but no change occurred to the audit rules
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- not directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- not file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- not registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -126,9 +126,9 @@
|
|||
- name: ADD assert that the rules were added and a change is detected
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -167,6 +167,6 @@
|
|||
- name: idempotent ADD assert that a change did not occur
|
||||
assert:
|
||||
that:
|
||||
- not directory | changed and directory.path_type == 'directory'
|
||||
- not file | changed and file.path_type == 'file'
|
||||
- not registry | changed and registry.path_type == 'registry'
|
||||
- directory is not changed and directory.path_type == 'directory'
|
||||
- file is not changed and file.path_type == 'file'
|
||||
- registry is not changed and registry.path_type == 'registry'
|
||||
|
|
|
@ -60,9 +60,9 @@
|
|||
- name: check mode modify assert that change is needed but rights still equal the original rights and not test_audit_rule_new_rights
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- not directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- not file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- not registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -126,9 +126,9 @@
|
|||
- name: modify assert that the rules were modified and a change is detected
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -167,6 +167,6 @@
|
|||
- name: idempotent modify assert that and a change is not detected
|
||||
assert:
|
||||
that:
|
||||
- not directory | changed and directory.path_type == 'directory'
|
||||
- not file | changed and file.path_type == 'file'
|
||||
- not registry | changed and registry.path_type == 'registry'
|
||||
- directory is not changed and directory.path_type == 'directory'
|
||||
- file is not changed and file.path_type == 'file'
|
||||
- registry is not changed and registry.path_type == 'registry'
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
- name: check mode remove assert that change detected, but rule is still present
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -112,9 +112,9 @@
|
|||
- name: remove assert that change detected and rule is gone
|
||||
assert:
|
||||
that:
|
||||
- directory | changed
|
||||
- file | changed
|
||||
- registry | changed
|
||||
- directory is changed
|
||||
- file is changed
|
||||
- registry is changed
|
||||
- not directory_results.matching_rule_found and directory_results.path_type == 'directory'
|
||||
- not file_results.matching_rule_found and file_results.path_type == 'file'
|
||||
- not registry_results.matching_rule_found and registry_results.path_type == 'registry'
|
||||
|
@ -146,6 +146,6 @@
|
|||
- name: idempotent remove assert that no change detected
|
||||
assert:
|
||||
that:
|
||||
- not directory | changed and directory.path_type == 'directory'
|
||||
- not file | changed and file.path_type == 'file'
|
||||
- not registry | changed and registry.path_type == 'registry'
|
||||
- directory is not changed and directory.path_type == 'directory'
|
||||
- file is not changed and file.path_type == 'file'
|
||||
- registry is not changed and registry.path_type == 'registry'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue