mysql_user: fixed encrypted option for MySQL 8.0 and test coverage

The purpose of this change was originally to expand test coverage to
unblock #76, but an issue was detected with the encrypted parameter on
MySQL 8.0 in the process of writing the tests. Additionally,
user_password_update_test.yml had been disabled at some point, so I
opted to replace it with two new files that will focus on the password
and plugin auth paths.
This commit is contained in:
Steve Teahan 2020-12-29 08:29:35 -05:00
parent 9eb007969c
commit 4100f4ba0e
7 changed files with 545 additions and 184 deletions

View file

@ -10,6 +10,8 @@
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function)
from distutils.version import LooseVersion
from functools import reduce
__metaclass__ = type
@ -133,3 +135,9 @@ def mysql_common_argument_spec():
ca_cert=dict(type='path', aliases=['ssl_ca']),
check_hostname=dict(type='bool', default=None),
)
def get_server_version(cursor):
cursor.execute("SELECT VERSION()")
version_str = cursor.fetchone()[0]
return LooseVersion(version_str)