Skip to content

Commit 5e47983

Browse files
committed
Update SASL-based LDAP authentication tests
On Microsoft Windows, the server plugin for SASL-based LDAP authentication is not supported for MySQL Server 8.0.X. NOTE: The server-side LDAP authentication plugins are included only in MySQL Enterprise Edition.
1 parent f9bdcea commit 5e47983

File tree

2 files changed

+45
-9
lines changed

2 files changed

+45
-9
lines changed

mysql-connector-python/tests/test_aio_connection.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,8 +2304,14 @@ class WL14110(tests.MySQLConnectorTests):
23042304

23052305
async def asyncSetUp(self):
23062306
self.server = tests.MYSQL_SERVERS[0]
2307-
if "com" not in self.server.license:
2308-
self.skipTest("Plugin not available in this version")
2307+
if not "com" in self.server.license:
2308+
self.skipTest("Plugin not available in GPL distributions")
2309+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
2310+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
2311+
self.skipTest(
2312+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
2313+
"authentication is not supported for MySQL Server 8.0.X"
2314+
)
23092315
if not tests.is_host_reachable("10.172.166.126"):
23102316
# Skip if remote ldap server is not reachable.
23112317
self.skipTest("Remote ldap server is not reachable")
@@ -2636,8 +2642,14 @@ class WL14263(tests.MySQLConnectorTests):
26362642

26372643
async def asyncSetUp(self):
26382644
self.server = tests.MYSQL_SERVERS[0]
2639-
if "com" in self.server.license:
2640-
self.skipTest("Plugin not available in this version")
2645+
if not "com" in self.server.license:
2646+
self.skipTest("Plugin not available in GPL distributions")
2647+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
2648+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
2649+
self.skipTest(
2650+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
2651+
"authentication is not supported for MySQL Server 8.0.X"
2652+
)
26412653
if not tests.is_host_reachable("100.103.19.5"):
26422654
# Skip if remote ldap server is not reachable.
26432655
self.skipTest("Remote ldap server is not reachable")
@@ -2781,8 +2793,14 @@ class WL14213(tests.MySQLConnectorTests):
27812793

27822794
async def asyncSetUp(self):
27832795
self.server = tests.MYSQL_SERVERS[0]
2784-
if "com" not in self.server.license:
2785-
self.skipTest("Plugin not available in this version")
2796+
if not "com" in self.server.license:
2797+
self.skipTest("Plugin not available in GPL distributions")
2798+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
2799+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
2800+
self.skipTest(
2801+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
2802+
"authentication is not supported for MySQL Server 8.0.X"
2803+
)
27862804
if not tests.is_host_reachable("100.103.18.98"):
27872805
# Skip if remote ldap server is not reachable.
27882806
self.skipTest("Remote ldap server is not reachable")

mysql-connector-python/tests/test_connection.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,13 @@ class WL14110(tests.MySQLConnectorTests):
27222722
def setUp(self):
27232723
self.server = tests.MYSQL_SERVERS[0]
27242724
if not "com" in self.server.license:
2725-
self.skipTest("Plugin not available in this version")
2725+
self.skipTest("Plugin not available in GPL distributions")
2726+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
2727+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
2728+
self.skipTest(
2729+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
2730+
"authentication is not supported for MySQL Server 8.0.X"
2731+
)
27262732
if not tests.is_host_reachable("10.172.166.126"):
27272733
# Skip if remote ldap server is not reachable.
27282734
self.skipTest("Remote ldap server is not reachable")
@@ -3061,7 +3067,13 @@ class WL14263(tests.MySQLConnectorTests):
30613067
def setUp(self):
30623068
self.server = tests.MYSQL_SERVERS[0]
30633069
if not "com" in self.server.license:
3064-
self.skipTest("Plugin not available in this version")
3070+
self.skipTest("Plugin not available in GPL distributions")
3071+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
3072+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
3073+
self.skipTest(
3074+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
3075+
"authentication is not supported for MySQL Server 8.0.X"
3076+
)
30653077
if not tests.is_host_reachable("100.103.19.5"):
30663078
# Skip if remote ldap server is not reachable.
30673079
self.skipTest("Remote ldap server is not reachable")
@@ -3353,7 +3365,13 @@ class WL14213(tests.MySQLConnectorTests):
33533365
def setUp(self):
33543366
self.server = tests.MYSQL_SERVERS[0]
33553367
if not "com" in self.server.license:
3356-
self.skipTest("Plugin not available in this version")
3368+
self.skipTest("Plugin not available in GPL distributions")
3369+
if os.name == "nt" and tests.MYSQL_VERSION < (8, 1):
3370+
# see https://dev.mysql.com/doc/refman/8.4/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-installation
3371+
self.skipTest(
3372+
"On Microsoft Windows, the server plugin for SASL-based LDAP "
3373+
"authentication is not supported for MySQL Server 8.0.X"
3374+
)
33573375
if not tests.is_host_reachable("100.103.18.98"):
33583376
# Skip if remote ldap server is not reachable.
33593377
self.skipTest("Remote ldap server is not reachable")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy