Skip to content

Commit

Permalink
Add integration test for digital_ocean_database_info (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamercad authored Oct 3, 2022
1 parent 01442cf commit 7db57a3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/289-database-info-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- integration tests - add a dedicated integration test for C(digital_ocean_database_info) (https://github.com/ansible-collections/community.digitalocean/issues/289).
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- block:

- name: Ensure API key is provided
ansible.builtin.fail:
msg: do_api_key should be defined in tests/integration/integration_config.yml
when:
- do_api_key is not defined
- do_api_key | length == 0

- name: Fetch all databases
community.digitalocean.digital_ocean_database_info:
oauth_token: "{{ do_api_key }}"
register: result

- name: Ensure all databases found
ansible.builtin.assert:
that:
- not result.changed
- result.data is defined

0 comments on commit 7db57a3

Please sign in to comment.