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

@ -5,7 +5,7 @@
- name: verify setup
assert:
that:
- vol|success
- vol is successful
- name: setup instance 1
cs_instance:
@ -16,7 +16,7 @@
- name: verify create instance
assert:
that:
- instance|success
- instance is successful
- name: setup instance 2
cs_instance:
@ -27,7 +27,7 @@
- name: verify create instance
assert:
that:
- instance|success
- instance is successful
- name: test fail if missing name
action: cs_volume
@ -36,7 +36,7 @@
- name: verify results of fail if missing name
assert:
that:
- vol|failed
- vol is failed
- "vol.msg == 'missing required arguments: name'"
- name: test create volume in check mode
@ -49,7 +49,7 @@
- name: verify results test create volume in check mode
assert:
that:
- vol|changed
- vol is changed
- name: test create volume
cs_volume:
@ -60,7 +60,7 @@
- name: verify results test create volume
assert:
that:
- vol|changed
- vol is changed
- vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol"
@ -73,7 +73,7 @@
- name: verify results test create volume idempotence
assert:
that:
- not vol|changed
- vol is not changed
- vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol"
@ -88,7 +88,7 @@
- name: verify results test create volume in check mode
assert:
that:
- vol|changed
- vol is changed
- vol.size == 20 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol"
@ -102,7 +102,7 @@
- name: verify results test create volume
assert:
that:
- vol|changed
- vol is changed
- vol.size == 10 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol"
@ -116,7 +116,7 @@
- name: verify results test create volume
assert:
that:
- not vol|changed
- vol is not changed
- vol.size == 10 * 1024 ** 3
- vol.name == "{{ cs_resource_prefix }}_vol"
@ -130,7 +130,7 @@
- name: verify results test attach volume in check mode
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is not defined
@ -143,7 +143,7 @@
- name: verify results test attach volume
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined
@ -157,7 +157,7 @@
- name: verify results test attach volume idempotence
assert:
that:
- not vol|changed
- vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined
@ -172,7 +172,7 @@
- name: verify results test attach attached volume to another vm in check mode
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_1 }}"
- vol.attached is defined
@ -186,7 +186,7 @@
- name: verify results test attach attached volume to another vm
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_2 }}"
- vol.attached is defined
@ -200,7 +200,7 @@
- name: verify results test attach attached volume to another vm idempotence
assert:
that:
- not vol|changed
- vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.vm == "{{ test_cs_instance_2 }}"
- vol.attached is defined
@ -214,7 +214,7 @@
- name: verify results test detach volume in check mdoe
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is defined
@ -226,7 +226,7 @@
- name: verify results test detach volume
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is undefined
@ -238,7 +238,7 @@
- name: verify results test detach volume idempotence
assert:
that:
- not vol|changed
- vol is not changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- vol.attached is undefined
@ -251,7 +251,7 @@
- name: verify results test create volume in check mode
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- name: test delete volume
@ -262,7 +262,7 @@
- name: verify results test create volume
assert:
that:
- vol|changed
- vol is changed
- vol.name == "{{ cs_resource_prefix }}_vol"
- name: test delete volume idempotence
@ -273,7 +273,7 @@
- name: verify results test delete volume idempotence
assert:
that:
- not vol|changed
- vol is not changed
- name: cleanup instance 1
cs_instance:
@ -283,7 +283,7 @@
- name: verify create instance
assert:
that:
- instance|success
- instance is successful
- name: cleanup instance 2
cs_instance:
@ -293,4 +293,4 @@
- name: verify create instance
assert:
that:
- instance|success
- instance is successful