mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-28 15:41:26 -07:00
mysql_db: Improve tests (#240)
- Define variables "db_names" and "db_formats" in defaults - Use of the "vars" option in includes instead of default parameters that might be overridden by a previous task - Use of the "loop" option in includes instead of duplicating include tasks - Use a nested loop on db_names and db_formats in state_dump_import test Signed-off-by: Nicolas Payart <npayart@gmail.com>
This commit is contained in:
parent
5522e45284
commit
e4de13aabe
2 changed files with 43 additions and 15 deletions
|
@ -4,7 +4,17 @@ mysql_user: root
|
|||
mysql_password: msandbox
|
||||
mysql_primary_port: 3307
|
||||
|
||||
db_name: 'data'
|
||||
# Database names
|
||||
db_names:
|
||||
- "data"
|
||||
- "db%"
|
||||
|
||||
# Database formats
|
||||
db_formats:
|
||||
- { format_type: "sql", file: "dbdata.sql", format_msg_type: "ASCII", file2: "dump2.sql", file3: "dump3.sql", file4: "dump4.sql" }
|
||||
- { format_type: "gz", file: "dbdata.gz", format_msg_type: "gzip", file2: "dump2.gz", file3: "dump3.gz", file4: "dump4.gz" }
|
||||
- { format_type: "bz2", file: "dbdata.bz2", format_msg_type: "bzip2", file2: "dump2.bz2", file3: "dump3.bz2", file4: "dump4.bz2" }
|
||||
|
||||
db_name2: 'data2'
|
||||
db_user1: 'datauser1'
|
||||
db_user2: 'datauser2'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue