mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update tests for required_if changes
These tests are doing string matches on the error condition. Update them to match the new strings. This is probably okay to push out to old releases even though it's technically backwards incompatible because production playbooks won't be checking that a parameter was missing. Param missing is something detected and fixed while writing the playbook.
This commit is contained in:
parent
8c41fee7bf
commit
638de22b35
9 changed files with 11 additions and 11 deletions
|
@ -42,7 +42,7 @@
|
|||
assert:
|
||||
that:
|
||||
- 'result.failed'
|
||||
- 'result.msg.startswith("state is present but the following are missing: handler")'
|
||||
- 'result.msg.startswith("state is present but all of the following are missing: handler")'
|
||||
|
||||
# ============================================================
|
||||
- name: test with all module required variables but no region
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
assert:
|
||||
that:
|
||||
- acc|failed
|
||||
- 'acc.msg == "missing required arguments: email,username,password,first_name,last_name"'
|
||||
- 'acc.msg == "missing required arguments: email, username, password, first_name, last_name"'
|
||||
|
||||
- name: test create user account in check mode
|
||||
cs_account:
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- "fw.msg == 'one of the following is required: ip_address,network'"
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test fail if missing params
|
||||
cs_firewall:
|
||||
|
@ -97,7 +97,7 @@
|
|||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- "fw.msg == 'one of the following is required: ip_address,network'"
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test present firewall rule ingress 80 in check mode
|
||||
cs_firewall:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
assert:
|
||||
that:
|
||||
- host|failed
|
||||
- 'host.msg == "missing required arguments: password,username,hypervisor,pod"'
|
||||
- 'host.msg == "missing required arguments: password, username, hypervisor, pod"'
|
||||
|
||||
- name: test create a host in check mode
|
||||
cs_host:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
assert:
|
||||
that:
|
||||
- user|failed
|
||||
- 'user.msg == "missing required arguments: account,email,password,first_name,last_name"'
|
||||
- 'user.msg == "missing required arguments: account, email, password, first_name, last_name"'
|
||||
|
||||
- name: test create user in check mode
|
||||
cs_user:
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
assert:
|
||||
that:
|
||||
- vpc|failed
|
||||
- 'vpc.msg == "state is present but the following are missing: cidr"'
|
||||
- 'vpc.msg == "state is present but all of the following are missing: cidr"'
|
||||
|
||||
- name: test create vpc in check mode
|
||||
cs_vpc:
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
assert:
|
||||
that:
|
||||
- 'output.failed'
|
||||
- 'output.msg == "state is present but the following are missing: data"'
|
||||
- 'output.msg == "state is present but all of the following are missing: data"'
|
||||
|
||||
- name: Create secret
|
||||
docker_secret:
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "result.failed"
|
||||
- "result.msg == 'state is absent but the following are missing: image_id'"
|
||||
- "result.msg == 'state is absent but all of the following are missing: image_id'"
|
||||
|
||||
# ============================================================
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
assert:
|
||||
that:
|
||||
- 'result.failed'
|
||||
- 'result.msg == "one of the following is required: name,group_id"'
|
||||
- 'result.msg == "one of the following is required: name, group_id"'
|
||||
|
||||
# ============================================================
|
||||
- name: test failure with only name
|
||||
|
@ -46,7 +46,7 @@
|
|||
assert:
|
||||
that:
|
||||
- 'result.failed'
|
||||
- 'result.msg == "one of the following is required: name,group_id"'
|
||||
- 'result.msg == "one of the following is required: name, group_id"'
|
||||
|
||||
# ============================================================
|
||||
- name: test failure with empty description (AWS API requires non-empty string desc)
|
||||
|
|
Loading…
Reference in a new issue