Add connector information to the returned values

I need to know what python library was used. I had a container with
both mysqlclient and pymysql installed and tests used a different
connector that what is advertised by the title of integration tests.
We need to prevent that otherwise our tests are worth nothing.
This commit is contained in:
Laurent Indermuehle 2023-01-19 16:36:06 +01:00
parent 454778406d
commit b24249d39a
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
2 changed files with 19 additions and 3 deletions

View file

@ -34,6 +34,11 @@ mysql_driver_fail_msg = ('A MySQL module is required: for Python 2.7 either PyMy
'Consider setting ansible_python_interpreter to use '
'the intended Python version.')
mysql_driver_info = {
"name": mysql_driver.__name__,
"version": mysql_driver.__version__
}
def parse_from_mysql_config_file(cnf):
# Default values of comment_prefix is '#' and ';'.