mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-03 19:20:35 +00:00
Skip ed25519 test if server can't load plugin
This commit is contained in:
@ -83,11 +83,14 @@ class TestConnection(unittest.TestCase):
|
|||||||
if os.environ.get("MAXSCALE_VERSION"):
|
if os.environ.get("MAXSCALE_VERSION"):
|
||||||
self.skipTest("MAXSCALE doesn't support ed25519 for now")
|
self.skipTest("MAXSCALE doesn't support ed25519 for now")
|
||||||
if self.connection.server_version < 100122:
|
if self.connection.server_version < 100122:
|
||||||
self.skipTest("ed25519 now supported")
|
self.skipTest("ed25519 not supported")
|
||||||
|
|
||||||
conn = self.connection
|
conn = self.connection
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
try:
|
||||||
cursor.execute("INSTALL SONAME 'auth_ed25519'")
|
cursor.execute("INSTALL SONAME 'auth_ed25519'")
|
||||||
|
except mariadb.DatabaseError:
|
||||||
|
self.skipTest("Server couldn't load auth_ed25519")
|
||||||
cursor.execute("DROP USER IF EXISTS eduser")
|
cursor.execute("DROP USER IF EXISTS eduser")
|
||||||
if self.connection.server_version < 100400:
|
if self.connection.server_version < 100400:
|
||||||
cursor.execute("CREATE USER eduser@'%' IDENTIFIED VIA ed25519 "
|
cursor.execute("CREATE USER eduser@'%' IDENTIFIED VIA ed25519 "
|
||||||
|
Reference in New Issue
Block a user