tempest/roles/tempest-cleanup
Martin Kopec 05c35eb793 Improve tempest-cleanup ansible role
The patch implements a new flag which will fail a job when any
resources were leaked - that can be used for verification that
tests are cleaning their resources after they are finished.

Change-Id: I212cdce9713c80491153b0bbdb313e75c1f96f1d
2020-11-03 21:47:14 +00:00
..
defaults Improve tempest-cleanup ansible role 2020-11-03 21:47:14 +00:00
tasks Improve tempest-cleanup ansible role 2020-11-03 21:47:14 +00:00
README.rst Improve tempest-cleanup ansible role 2020-11-03 21:47:14 +00:00

README.rst

Tempest cleanup

Documentation regarding tempest cleanup can be found at the following link: https://docs.openstack.org/tempest/latest/cleanup.html

When init_saved_state and dry_run variables are set to false, the role execution will run tempest cleanup which deletes resources not present in the saved_state.json file.

Role Variables

Role usage

The role can be also used for verification that tempest tests don't leak any resources or to test that 'tempest cleanup' command deleted all leaked resources as expected. Either way the role needs to be run first with init_saved_state variable set to true prior any tempest tests got executed. Then, after tempest tests got executed this role needs to be run again with role variables set according to the desired outcome:

  1. to verify that tempest tests don't leak any resources run_tempest_dry_cleanup and run_tempest_fail_if_leaked_resources have to be set to true.
  2. to check that 'tempest cleanup' command deleted all the leaked resources run_tempest_cleanup and run_tempest_fail_if_leaked_resources have to be set to true.