4fe08441be
* 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
104 lines
2.5 KiB
YAML
104 lines
2.5 KiB
YAML
---
|
|
- name: setup domain
|
|
cs_domain: path={{ cs_resource_prefix }}-domain
|
|
register: dom
|
|
- name: verify setup domain
|
|
assert:
|
|
that:
|
|
- dom is successful
|
|
|
|
- name: setup account
|
|
cs_account:
|
|
name: "{{ cs_resource_prefix }}_user"
|
|
username: "{{ cs_resource_prefix }}_username"
|
|
password: "{{ cs_resource_prefix }}_password"
|
|
last_name: "{{ cs_resource_prefix }}_last_name"
|
|
first_name: "{{ cs_resource_prefix }}_first_name"
|
|
email: "{{ cs_resource_prefix }}@example.com"
|
|
network_domain: "{{ cs_resource_prefix }}-local"
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: acc
|
|
- name: verify setup account
|
|
assert:
|
|
that:
|
|
- acc is successful
|
|
|
|
- name: test failed unkonwn type
|
|
cs_resourcelimit:
|
|
type: unkonwn
|
|
limit: 20
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: rl
|
|
ignore_errors: yes
|
|
- name: verify test failed unkonwn type
|
|
assert:
|
|
that:
|
|
- rl is failed
|
|
|
|
- name: test failed missing type
|
|
cs_resourcelimit:
|
|
register: rl
|
|
ignore_errors: yes
|
|
- name: verify test failed missing type
|
|
assert:
|
|
that:
|
|
- rl is failed
|
|
|
|
- name: setup resource limits domain
|
|
cs_resourcelimit:
|
|
type: instance
|
|
limit: 10
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: rl
|
|
- name: verify setup resource limits domain
|
|
assert:
|
|
that:
|
|
- rl is successful
|
|
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
|
- rl.limit == 10
|
|
|
|
- name: set resource limits domain to 20 in check mode
|
|
cs_resourcelimit:
|
|
type: instance
|
|
limit: 20
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: rl
|
|
check_mode: true
|
|
- name: verify setup resource limits domain to 20 in check mode
|
|
assert:
|
|
that:
|
|
- rl is successful
|
|
- rl is changed
|
|
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
|
- rl.limit == 10
|
|
|
|
- name: set resource limits domain to 20
|
|
cs_resourcelimit:
|
|
type: instance
|
|
limit: 20
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: rl
|
|
- name: verify setup resource limits domain to 20
|
|
assert:
|
|
that:
|
|
- rl is successful
|
|
- rl is changed
|
|
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
|
- rl.limit == 20
|
|
|
|
- name: set resource limits domain to 20 idempotence
|
|
cs_resourcelimit:
|
|
type: instance
|
|
limit: 20
|
|
domain: "{{ cs_resource_prefix }}-domain"
|
|
register: rl
|
|
- name: verify setup resource limits domain to 20 idempotence
|
|
assert:
|
|
that:
|
|
- rl is successful
|
|
- rl is not changed
|
|
- rl.domain == "{{ cs_resource_prefix }}-domain"
|
|
- rl.limit == 20
|
|
|
|
- include: instance.yml
|
|
- include: cpu.yml
|