Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql_db: Fix assert in tests suite #239

Merged

Conversation

koleo
Copy link
Contributor

@koleo koleo commented Oct 23, 2021

SUMMARY

In the encoding_dump_import test suite of the mysql_db module, the "assert" tasks check the wrong variable.

  • Fix the variable name (L.48) to match the assert (L.52)
  • Add the missing register (L.81) expected by the next assert (L.85)
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

mysql_db

@codecov
Copy link

codecov bot commented Oct 23, 2021

Codecov Report

Merging #239 (a424e56) into main (6b12435) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   77.61%   77.61%           
=======================================
  Files          24       24           
  Lines        2171     2171           
  Branches      510      510           
=======================================
  Hits         1685     1685           
  Misses        319      319           
  Partials      167      167           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b12435...a424e56. Read the comment docs.

Copy link
Collaborator

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@koleo thanks for fixing this!

@Andersson007 Andersson007 merged commit 5522e45 into ansible-collections:main Oct 25, 2021
Andersson007 pushed a commit to Andersson007/community.mysql that referenced this pull request Nov 29, 2021
Signed-off-by: Nicolas Payart <[email protected]>
(cherry picked from commit 5522e45)
Andersson007 added a commit that referenced this pull request Nov 29, 2021
* Allow the "%" character in database name (#227)

The naming rules for MySQL/MariaDB identifiers, when quoted, allow the
`%` character.

However, currently, the use of the `%` character in database names
results in mismatch or missing databases.

- Rewrite query to identify the databases in the catalog using
  `information_schema` instead of `SHOW DATABASES LIKE`
- Escape the `%` character in `CREATE DATABASE` query.

Signed-off-by: Nicolas Payart <[email protected]>
(cherry picked from commit 6b12435)

* mysql_db: Fix assert in tests suite (#239)

Signed-off-by: Nicolas Payart <[email protected]>
(cherry picked from commit 5522e45)

* 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 <[email protected]>
(cherry picked from commit e4de13a)

* MAINTAINERS file: Add new maintainer (#248)

(cherry picked from commit d411a8e)

Co-authored-by: Nicolas PAYART <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants