Skip ed25519 test if server can't load plugin

This commit is contained in:
Georg Richter
2019-12-17 17:38:00 +01:00
parent 9d9fd45f3c
commit d79334b5a7

View File

@ -83,11 +83,14 @@ class TestConnection(unittest.TestCase):
if os.environ.get("MAXSCALE_VERSION"):
self.skipTest("MAXSCALE doesn't support ed25519 for now")
if self.connection.server_version < 100122:
self.skipTest("ed25519 now supported")
self.skipTest("ed25519 not supported")
conn = self.connection
cursor = conn.cursor()
cursor.execute("INSTALL SONAME 'auth_ed25519'")
try:
cursor.execute("INSTALL SONAME 'auth_ed25519'")
except mariadb.DatabaseError:
self.skipTest("Server couldn't load auth_ed25519")
cursor.execute("DROP USER IF EXISTS eduser")
if self.connection.server_version < 100400:
cursor.execute("CREATE USER eduser@'%' IDENTIFIED VIA ed25519 "