mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-06-27 10:40:24 -07:00
[PR #427/0a68bb27 backport][stable-2] CI is changed (#429)
* Is changed (#427)
* Refactor tests to use "is" and "is not" changed
* Refactor tests to use is succeeded or is failed
* Reformat indentation
* Add filter "bool" to prevent issues
(cherry picked from commit 0a68bb270f
)
* Fix error message verification
I don't know why this works on main, but in stable-1, the error message
is "invalid privileges string: Invalid privileges specified:
frozenset({'INVALID'})"
* Add filter for test that won't work with mariadb
* Add test databases cleanup
* Backport small diff from main
This commit is contained in:
parent
4aa166ec13
commit
58b850f217
20 changed files with 457 additions and 193 deletions
|
@ -47,8 +47,8 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "mysql_version in result.version.full"
|
||||
- result is not changed
|
||||
- "mysql_version in result.version.full or mariadb_version in result.version.full"
|
||||
- result.settings != {}
|
||||
- result.global_status != {}
|
||||
- result.databases != {}
|
||||
|
@ -66,7 +66,7 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result is not changed
|
||||
- result.version != {}
|
||||
|
||||
# Remove cred files
|
||||
|
@ -86,8 +86,8 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.version != {}
|
||||
- result is not changed
|
||||
- result.version != {}
|
||||
|
||||
# Test excluding
|
||||
- name: Collect all info except settings and users
|
||||
|
@ -98,13 +98,13 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.version != {}
|
||||
- result.global_status != {}
|
||||
- result.databases != {}
|
||||
- result.engines != {}
|
||||
- result.settings is not defined
|
||||
- result.users is not defined
|
||||
- result is not changed
|
||||
- result.version != {}
|
||||
- result.global_status != {}
|
||||
- result.databases != {}
|
||||
- result.engines != {}
|
||||
- result.settings is not defined
|
||||
- result.users is not defined
|
||||
|
||||
# Test including
|
||||
- name: Collect info only about version and databases
|
||||
|
@ -117,13 +117,13 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.version != {}
|
||||
- result.databases != {}
|
||||
- result.engines is not defined
|
||||
- result.settings is not defined
|
||||
- result.global_status is not defined
|
||||
- result.users is not defined
|
||||
- result is not changed
|
||||
- result.version != {}
|
||||
- result.databases != {}
|
||||
- result.engines is not defined
|
||||
- result.settings is not defined
|
||||
- result.global_status is not defined
|
||||
- result.users is not defined
|
||||
|
||||
# Test exclude_fields: db_size
|
||||
# 'unsupported' element is passed to check that an unsupported value
|
||||
|
@ -140,9 +140,9 @@
|
|||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.databases != {}
|
||||
- result.databases.mysql == {}
|
||||
- result is not changed
|
||||
- result.databases != {}
|
||||
- result.databases.mysql == {}
|
||||
|
||||
########################################################
|
||||
# Issue #65727, empty databases must be in returned dict
|
||||
|
@ -163,9 +163,9 @@
|
|||
# Check acme is in returned dict
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.databases.acme.size == 0
|
||||
- result.databases.mysql != {}
|
||||
- result is not changed
|
||||
- result.databases.acme.size == 0
|
||||
- result.databases.mysql != {}
|
||||
|
||||
- name: Collect info about databases excluding their sizes
|
||||
mysql_info:
|
||||
|
@ -180,9 +180,9 @@
|
|||
# Check acme is in returned dict
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.databases.acme == {}
|
||||
- result.databases.mysql == {}
|
||||
- result is not changed
|
||||
- result.databases.acme == {}
|
||||
- result.databases.mysql == {}
|
||||
|
||||
- name: Remove acme database
|
||||
mysql_db:
|
||||
|
@ -212,4 +212,4 @@
|
|||
- name: Check
|
||||
assert:
|
||||
that:
|
||||
result.databases.allviews.size == 0
|
||||
- result.databases.allviews.size == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue