ansible/test/integration/targets/cs_configuration/tasks/main.yml
Matt Martz 4fe08441be 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
2017-11-27 17:58:08 -05:00

204 lines
5.1 KiB
YAML

---
- name: test fail if missing name
cs_configuration:
register: config
ignore_errors: true
- name: verify results of fail if missing arguments
assert:
that:
- config is failed
- "config.msg.startswith('missing required arguments: ')"
- name: test configuration
cs_configuration:
name: network.loadbalancer.haproxy.stats.visibility
value: global
register: config
- name: verify test configuration
assert:
that:
- config is successful
- name: test update configuration string in check mode
cs_configuration:
name: network.loadbalancer.haproxy.stats.visibility
value: all
register: config
check_mode: true
- name: verify test update configuration string in check mode
assert:
that:
- config is successful
- config is changed
- config.value == "global"
- config.name == "network.loadbalancer.haproxy.stats.visibility"
- name: test update configuration string
cs_configuration:
name: network.loadbalancer.haproxy.stats.visibility
value: all
register: config
- name: verify test update configuration string
assert:
that:
- config is successful
- config is changed
- config.value == "all"
- config.name == "network.loadbalancer.haproxy.stats.visibility"
- name: test update configuration string idempotence
cs_configuration:
name: network.loadbalancer.haproxy.stats.visibility
value: all
register: config
- name: verify test update configuration string idempotence
assert:
that:
- config is successful
- config is not changed
- config.value == "all"
- config.name == "network.loadbalancer.haproxy.stats.visibility"
- name: test reset configuration string
cs_configuration:
name: network.loadbalancer.haproxy.stats.visibility
value: global
register: config
- name: verify test reset configuration string
assert:
that:
- config is successful
- config is changed
- config.value == "global"
- config.name == "network.loadbalancer.haproxy.stats.visibility"
- name: test configuration
cs_configuration:
name: vmware.recycle.hung.wokervm
value: false
register: config
- name: verify test configuration
assert:
that:
- config is successful
- name: test update configuration bool in check mode
cs_configuration:
name: vmware.recycle.hung.wokervm
value: true
register: config
check_mode: true
- name: verify test update configuration bool in check mode
assert:
that:
- config is successful
- config is changed
- config.value == "false"
- config.name == "vmware.recycle.hung.wokervm"
- name: test update configuration bool
cs_configuration:
name: vmware.recycle.hung.wokervm
value: true
register: config
- name: verify test update configuration bool
assert:
that:
- config is successful
- config is changed
- config.value == "true"
- config.name == "vmware.recycle.hung.wokervm"
- name: test update configuration bool idempotence
cs_configuration:
name: vmware.recycle.hung.wokervm
value: true
register: config
- name: verify test update configuration bool idempotence
assert:
that:
- config is successful
- config is not changed
- config.value == "true"
- config.name == "vmware.recycle.hung.wokervm"
- name: test reset configuration bool
cs_configuration:
name: vmware.recycle.hung.wokervm
value: false
register: config
- name: verify test reset configuration bool
assert:
that:
- config is successful
- config is changed
- config.value == "false"
- config.name == "vmware.recycle.hung.wokervm"
- name: test configuration
cs_configuration:
name: agent.load.threshold
value: 0.7
register: config
- name: verify test configuration
assert:
that:
- config is successful
- name: test update configuration float in check mode
cs_configuration:
name: agent.load.threshold
value: 0.81
register: config
check_mode: true
- name: verify update configuration float in check mode
assert:
that:
- config is successful
- config is changed
- config.value == "0.7"
- config.name == "agent.load.threshold"
- name: test update configuration float
cs_configuration:
name: agent.load.threshold
value: 0.81
register: config
- name: verify update configuration float
assert:
that:
- config is successful
- config is changed
- config.value == "0.81"
- config.name == "agent.load.threshold"
- name: test update configuration float idempotence
cs_configuration:
name: agent.load.threshold
value: 0.81
register: config
- name: verify update configuration float idempotence
assert:
that:
- config is successful
- config is not changed
- config.value == "0.81"
- config.name == "agent.load.threshold"
- name: reset configuration float
cs_configuration:
name: agent.load.threshold
value: 0.7
register: config
- name: verify reset configuration float
assert:
that:
- config is successful
- config is changed
- config.value == "0.7"
- config.name == "agent.load.threshold"
- include: storage.yml
- include: account.yml
- include: zone.yml
- include: cluster.yml