tests: vultr: convert legacy tests to targets (#50156)

This commit is contained in:
René Moser 2019-01-07 22:23:54 +01:00 committed by GitHub
commit 48ffe2f3b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 210 additions and 60 deletions

View file

@ -141,3 +141,39 @@ For example, this allows you to take action on nodes grouped by location or OS n
- name: Rebooting the machine
shell: reboot
become: True
Integration tests
-----------------
Ansible includes integration tests for all Vultr modules.
These tests are meant to run against the public Vultr API and that is why they require a valid key to access the API.
Prepare the test setup:
.. code-block:: shell
$ cd ansible # location the ansible source is
$ source ./hacking/env-setup
Set the Vultr API key:
.. code-block:: shell
$ cd test/integration
$ cp cloud-config-vultr.ini.template cloud-config-vultr.ini
$ vi cloud-config-vultr.ini
Run all Vultr tests:
.. code-block:: shell
$ ansible-test integration cloud/vultr/ -v --diff --allow-unsupported
To run a specific test, e.g. vultr_account_facts:
.. code-block:: shell
$ ansible-test integration cloud/vultr/vultr_account_facts -v --diff --allow-unsupported