mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
37 lines
897 B
YAML
37 lines
897 B
YAML
|
---
|
||
|
- name: test without credentials
|
||
|
rds_instance:
|
||
|
db_instance_identifier: test-rds-instance
|
||
|
register: result
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- result.failed
|
||
|
- 'result.msg == "The rds_instance module requires a region and none was found in configuration, environment variables or module parameters"'
|
||
|
|
||
|
- name: test without credentials
|
||
|
rds_instance:
|
||
|
db_instance_identifier: test-rds-instance
|
||
|
region: us-east-1
|
||
|
register: result
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- result.failed
|
||
|
- '"Unable to locate credentials" in result.msg'
|
||
|
|
||
|
- name: test with invalid credentials
|
||
|
rds_instance:
|
||
|
db_instance_identifier: test-rds-instance
|
||
|
region: us-east-1
|
||
|
profile: doesnotexist
|
||
|
register: result
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- result.failed
|
||
|
- 'result.msg == "The config profile (doesnotexist) could not be found"'
|