Reorg tests setup and add teardown/cleanup

Perform clean up at the end of the tests. Also reorganized
setup/teardown in env_* files in a similar way proposed in dnsrecord
module.
This commit is contained in:
Sergio Oliveira Campos
2020-08-03 12:00:25 -03:00
parent 675125ed0b
commit d69eb94d90
6 changed files with 37 additions and 30 deletions

View File

@@ -7,11 +7,8 @@
tasks:
# Setup
- name: Ensure zone is absent.
ipadnszone:
ipaadmin_password: SomeADMINpassword
name: testzone.local
state: absent
- name: Setup testing environment
include_tasks: env_setup.yml
# Tests
- name: Ensure zone is present.
@@ -186,3 +183,7 @@
state: absent
register: result
failed_when: result.changed
# Teardown
- name: Teardown testing environment
include_tasks: env_teardown.yml