mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-24 03:11:25 -07:00
Add clean up in "always" phase of the block
Because our tests use --retry-on-error, and the first thing the test does is to try to create the database. We must cleanup otherwise if there is a retry, it will throw a misleading "database already exists" error.
This commit is contained in:
parent
d6956e236e
commit
e412aa5142
1 changed files with 7 additions and 0 deletions
|
@ -390,3 +390,10 @@
|
|||
that:
|
||||
- result is changed
|
||||
- result.executed_queries == ['DROP DATABASE {{ test_db }}']
|
||||
|
||||
always:
|
||||
|
||||
- name: Clean up test_db
|
||||
mysql_query:
|
||||
<<: *mysql_params
|
||||
query: 'DROP DATABASE IF EXISTS {{ test_db }}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue