ansible/test/legacy/roles/test_cloudflare_dns/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

64 lines
1.7 KiB
YAML

---
- name: "Test: no args"
cloudflare_dns:
ignore_errors: true
register: cloudflare_dns
- name: "Validate: no args"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('missing required arguments: ') != -1"
- name: "Test: only credentials"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
ignore_errors: true
register: cloudflare_dns
- name: "Validate: only credentials"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('missing required arguments: ') != -1"
- name: "Test: credentials and zone"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
zone: "{{ cloudflare_zone }}"
ignore_errors: true
register: cloudflare_dns
- name: "Validate: credentials and zone"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('but the following are missing: ') != -1"
- name: "Test: credentials, zone and type"
cloudflare_dns:
account_email: "{{ cloudflare_email }}"
account_api_token: "{{ cloudflare_api_token }}"
zone: "{{ cloudflare_zone }}"
type: TXT
ignore_errors: true
register: cloudflare_dns
- name: "Validate: credentials, zone and type"
assert:
that:
- cloudflare_dns is failed
- "cloudflare_dns.msg.find('but the following are missing: ') != -1"
######## record tests #################
- include: a_record.yml
- include: aaaa_record.yml
- include: cname_record.yml
- include: txt_record.yml
- include: ns_record.yml
- include: spf_record.yml
- include: mx_record.yml
- include: srv_record.yml