This repository was archived by the owner on Feb 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Continue to run test suite even if one test fails #375
Copy link
Copy link
Open
Labels
Description
Problem
Ansible will fail if any task fails by default. This is great if using Ansible as a configuration tool, but not so great if using Ansible as a test framework. In Ansible 2.0, the block/rescue/always concept was introduced--allowing us to catch errors and continue to do other things. So why not do that with a set of tests?
Benefits Over Current Approach
- By catching errors and continuing to run tests, users are able to get more test results and could find more bugs sooner. This is especially true when there is a bug that is being fixed but not yet put into a compose.
- All done natively in Ansible
Proposal
- Separate tests into individual yml files
- Create a role that will import the above yml files in a block/rescue that will save the test status in a dictionary.
- Create an entry point playbook, that calls the above role for each of the tests and pass/fail based on whats in the dictionary.
See simple example here: master...mike-nguyen:tester_poc
Potential Issues
- Might not work with the way improved-sanity-test is laid out
- Compatibility with Standard Test Interface https://fedoraproject.org/wiki/CI/Standard_Test_Interface
- Tagging tests
- Triaging failures might be more difficult if prior test leaves system in undesired state