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:
Matt Martz 2017-11-27 16:58:08 -06:00 committed by ansibot
commit 4fe08441be
349 changed files with 4086 additions and 3844 deletions

View file

@ -17,8 +17,8 @@
- name: it should skip, change and create
assert:
that:
- result|skipped
- result|changed
- result is skipped
- result is changed
- result.created
@ -36,7 +36,7 @@
- name: it should fail with an AccessDeniedException
assert:
that:
- result|failed
- result is failed
- '"AccessDeniedException" in result.msg'
@ -52,7 +52,7 @@
- name: it should change and create
assert:
that:
- result|changed
- result is changed
- result.created
@ -69,8 +69,8 @@
- name: it should not skip, should not change
assert:
that:
- not result|skipped
- not result|changed
- result is not skipped
- result is not changed
- name: When creating a repository that already exists
@ -85,7 +85,7 @@
- name: it should not change
assert:
that:
- not result|changed
- result is not changed
- name: When in check mode, and deleting a policy that does not exists
@ -102,8 +102,8 @@
- name: it should not skip and not change
assert:
that:
- not result|skipped
- not result|changed
- result is not skipped
- result is not changed
- name: When in check mode, setting policy on a repository that has no policy
@ -120,8 +120,8 @@
- name: it should skip, change and not create
assert:
that:
- result|skipped
- result|changed
- result is skipped
- result is changed
- not result.created
@ -138,7 +138,7 @@
- name: it should change and not create
assert:
that:
- result|changed
- result is changed
- not result.created
@ -156,8 +156,8 @@
- name: it should skip, change but not create
assert:
that:
- result|skipped
- result|changed
- result is skipped
- result is changed
- not result.created
@ -174,7 +174,7 @@
- name: it should change and not create
assert:
that:
- result|changed
- result is changed
- not result.created
@ -191,7 +191,7 @@
- name: it should change and not create
assert:
that:
- result|changed
- result is changed
- not result.created
@ -208,7 +208,7 @@
- name: it should not change
assert:
that:
- not result|changed
- result is not changed
- name: When omitting policy on a repository that has a policy
@ -223,7 +223,7 @@
- name: it should not change
assert:
that:
- not result|changed
- result is not changed
- name: When specifying both policy and delete_policy
@ -241,7 +241,7 @@
- name: it should fail
assert:
that:
- result|failed
- result is failed
- name: When specifying invalid JSON for policy
@ -258,7 +258,7 @@
- name: it should fail
assert:
that:
- result|failed
- result is failed
- name: When in check mode, deleting a policy that exists
@ -275,8 +275,8 @@
- name: it should skip, change and not create
assert:
that:
- result|skipped
- result|changed
- result is skipped
- result is changed
- not result.created
@ -293,7 +293,7 @@
- name: it should change
assert:
that:
- result|changed
- result is changed
- name: When in check mode, deleting a policy that does not exist
@ -310,8 +310,8 @@
- name: it should not change
assert:
that:
- not result|skipped
- not result|changed
- result is not skipped
- result is not changed
- name: When deleting a policy that does not exist
@ -327,7 +327,7 @@
- name: it should not change
assert:
that:
- not result|changed
- result is not changed
always: