mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-16 01:45:25 -07:00
cloudstack: add check mode tests (#24908)
* cloudstack: test: cs_network_acl: add check_mode tests * cloudstack: test: cs_pod: add check_mode tests * cloudstack: test: cs_user: add check_mode tests * cloudstack: test: cs_sshkeypair: add check_mode tests * cloudstack: test: cs_project: add check_mode tests * cloudstack: test: cs_vpc: add check_mode tests * cloudstack: test: cs_vpn_gateway: add check_mode tests * cloudstack: test: cs_volume: add check_mode tests * cloudstack: test: cs_vmsnapshot: add check_mode tests * cloudstack: test: cs_account: add check_mode tests * cloudstack: test: cs_affinitygroup: add check_mode tests * cloudstack: test: cs_cluster: add check_mode tests * cloudstack: test: cs_domain: add check_mode tests * cloudstack: test: cs_instancegroup: add check_mode tests * cloudstack: test: cs_iso: add check_mode tests * cloudstack: test: cs_loadbalancer_rule: add check_mode tests * cloudstack: test: cs_portforward: add check_mode tests * cloudstack: test: cs_resourcelimit: add check_mode tests * cloudstack: test: cs_securitygroup: add check_mode tests * cloudstack: test: cs_securitygroup_rule: add check_mode tests * cloudstack: test: cs_configuration: add check_mode tests * cloudstack: test: cs_firewall: add check_mode tests * cloudstack: test: cs_instance: add check_mode tests * cloudstack: query current tags from API Fixes unexpected tags returned in check mode.
This commit is contained in:
parent
2af5556901
commit
d5b04aa1f1
32 changed files with 1838 additions and 33 deletions
|
@ -10,6 +10,23 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- name: test update configuration account in check mode
|
||||
cs_configuration:
|
||||
name: allow.public.user.templates
|
||||
account: "{{ test_cs_configuration_account }}"
|
||||
value: false
|
||||
register: config
|
||||
check_mode: true
|
||||
- name: verify update configuration account in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config.value == "true"
|
||||
- config.name == "allow.public.user.templates"
|
||||
- config.scope == "account"
|
||||
- config.account == "{{ test_cs_configuration_account }}"
|
||||
|
||||
- name: test update configuration account
|
||||
cs_configuration:
|
||||
name: allow.public.user.templates
|
||||
|
|
|
@ -10,6 +10,23 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- name: test update configuration cluster in check mode
|
||||
cs_configuration:
|
||||
name: cpu.overprovisioning.factor
|
||||
cluster: "{{ test_cs_configuration_cluster }}"
|
||||
value: 2.0
|
||||
register: config
|
||||
check_mode: true
|
||||
- name: verify update configuration cluster in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config.value == "1.0"
|
||||
- config.name == "cpu.overprovisioning.factor"
|
||||
- config.scope == "cluster"
|
||||
- config.cluster == "{{ test_cs_configuration_cluster }}"
|
||||
|
||||
- name: test update configuration cluster
|
||||
cs_configuration:
|
||||
name: cpu.overprovisioning.factor
|
||||
|
|
|
@ -19,6 +19,20 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- 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|success
|
||||
- config|changed
|
||||
- config.value == "global"
|
||||
- config.name == "network.loadbalancer.haproxy.stats.visibility"
|
||||
|
||||
- name: test update configuration string
|
||||
cs_configuration:
|
||||
name: network.loadbalancer.haproxy.stats.visibility
|
||||
|
@ -68,6 +82,20 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- 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|success
|
||||
- config|changed
|
||||
- config.value == "false"
|
||||
- config.name == "vmware.recycle.hung.wokervm"
|
||||
|
||||
- name: test update configuration bool
|
||||
cs_configuration:
|
||||
name: vmware.recycle.hung.wokervm
|
||||
|
@ -117,6 +145,20 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- 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|success
|
||||
- config|changed
|
||||
- config.value == "0.7"
|
||||
- config.name == "agent.load.threshold"
|
||||
|
||||
- name: test update configuration float
|
||||
cs_configuration:
|
||||
name: agent.load.threshold
|
||||
|
|
|
@ -10,6 +10,23 @@
|
|||
that:
|
||||
- config|success
|
||||
|
||||
- name: test update configuration storage in check mode
|
||||
cs_configuration:
|
||||
name: storage.overprovisioning.factor
|
||||
storage: "{{ test_cs_configuration_storage }}"
|
||||
value: 3.0
|
||||
register: config
|
||||
check_mode: true
|
||||
- name: verify update configuration storage in check mode
|
||||
assert:
|
||||
that:
|
||||
- config|success
|
||||
- config|changed
|
||||
- config.value == "2.0"
|
||||
- config.name == "storage.overprovisioning.factor"
|
||||
- config.scope == "storagepool"
|
||||
- config.storage == "{{ test_cs_configuration_storage }}"
|
||||
|
||||
- name: test update configuration storage
|
||||
cs_configuration:
|
||||
name: storage.overprovisioning.factor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue