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
|
@ -36,10 +36,10 @@
|
|||
- name: Assert that handler data was set successfully and properly
|
||||
assert:
|
||||
that:
|
||||
- "handler | success"
|
||||
- "handler | changed"
|
||||
- "handler_twice | success"
|
||||
- "not handler_twice | changed"
|
||||
- "handler is successful"
|
||||
- "handler is changed"
|
||||
- "handler_twice is successful"
|
||||
- "handler_twice is not changed"
|
||||
- "handler_stat.stat.exists == true"
|
||||
- "handler['name'] == 'handler'"
|
||||
- "handler['file'] == '/etc/sensu/conf.d/handlers/handler.json'"
|
||||
|
@ -81,10 +81,10 @@
|
|||
- name: Assert that handler deletion was successful
|
||||
assert:
|
||||
that:
|
||||
- "handler_delete | success"
|
||||
- "handler_delete | changed"
|
||||
- "handler_delete_twice | success"
|
||||
- "not handler_delete_twice | changed"
|
||||
- "handler_delete is successful"
|
||||
- "handler_delete is changed"
|
||||
- "handler_delete_twice is successful"
|
||||
- "handler_delete_twice is not changed"
|
||||
- "handler_stat.stat.exists == false"
|
||||
|
||||
- name: Configuring a handler without a name should fail
|
||||
|
@ -97,7 +97,7 @@
|
|||
- name: Assert that configuring a handler without a name fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'required arguments: name' in failure['msg']"
|
||||
|
||||
- name: Configuring a handler without a type should fail
|
||||
|
@ -110,7 +110,7 @@
|
|||
- name: Assert that configuring a handler without a type fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: type' in failure['msg']"
|
||||
|
||||
- include: pipe.yml
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- name: Assert that configuring a handler with missing pipe parameters fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: command' in failure['msg']"
|
||||
|
||||
- name: Configure a handler with pipe parameters
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: Assert that configuring a handler with missing set parameters fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: handlers' in failure['msg']"
|
||||
|
||||
- name: Configure a set handler
|
||||
|
@ -27,8 +27,8 @@
|
|||
- name: Validate set handler return data
|
||||
assert:
|
||||
that:
|
||||
- "handler | success"
|
||||
- "handler | changed"
|
||||
- "handler is successful"
|
||||
- "handler is changed"
|
||||
- "handler_stat.stat.exists == true"
|
||||
- "handler['name'] == 'set'"
|
||||
- "handler['file'] == '/etc/sensu/conf.d/handlers/set.json'"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: Assert that configuring a handler with missing tcp parameters fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: socket' in failure['msg']"
|
||||
|
||||
- name: Configure a tcp handler
|
||||
|
@ -28,8 +28,8 @@
|
|||
- name: Validate tcp handler return data
|
||||
assert:
|
||||
that:
|
||||
- "handler | success"
|
||||
- "handler | changed"
|
||||
- "handler is successful"
|
||||
- "handler is changed"
|
||||
- "handler_stat.stat.exists == true"
|
||||
- "handler['name'] == 'tcp'"
|
||||
- "handler['file'] == '/etc/sensu/conf.d/handlers/tcp.json'"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: Assert that configuring a handler with missing transport parameters fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: pipe' in failure['msg']"
|
||||
|
||||
- name: Configure a transport handler
|
||||
|
@ -28,8 +28,8 @@
|
|||
- name: Validate transport handler return data
|
||||
assert:
|
||||
that:
|
||||
- "handler | success"
|
||||
- "handler | changed"
|
||||
- "handler is successful"
|
||||
- "handler is changed"
|
||||
- "handler_stat.stat.exists == true"
|
||||
- "handler['name'] == 'transport'"
|
||||
- "handler['file'] == '/etc/sensu/conf.d/handlers/transport.json'"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- name: Assert that configuring a handler with missing udp parameters fails
|
||||
assert:
|
||||
that:
|
||||
- failure | failed
|
||||
- failure is failed
|
||||
- "'the following are missing: socket' in failure['msg']"
|
||||
|
||||
- name: Configure a udp handler
|
||||
|
@ -28,8 +28,8 @@
|
|||
- name: Validate udp handler return data
|
||||
assert:
|
||||
that:
|
||||
- "handler | success"
|
||||
- "handler | changed"
|
||||
- "handler is successful"
|
||||
- "handler is changed"
|
||||
- "handler_stat.stat.exists == true"
|
||||
- "handler['name'] == 'udp'"
|
||||
- "handler['file'] == '/etc/sensu/conf.d/handlers/udp.json'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue