add ui
This commit is contained in:
parent
48a15c620e
commit
672fba544a
@ -31,6 +31,10 @@ class AuthenticationProviderFactorySuite extends SparkFunSuite {
|
||||
val ldap = AuthenticationProviderFactory.getAuthenticationProvider(AuthMethods.LDAP, conf)
|
||||
val exception = intercept[AuthenticationException](ldap.authenticate("test", "test"))
|
||||
assert(exception.getMessage.contains("Error validating LDAP user:"))
|
||||
|
||||
val e2 = intercept[AuthenticationException](
|
||||
AuthenticationProviderFactory.getAuthenticationProvider(null, conf))
|
||||
assert(e2.getMessage === "Not a valid authentication method")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,7 +25,6 @@ import org.apache.hadoop.security.authorize.AuthorizationException
|
||||
import org.apache.spark.{KyuubiConf, KyuubiSparkUtil, SparkConf, SparkFunSuite}
|
||||
|
||||
import yaooqinn.kyuubi.KyuubiSQLException
|
||||
import yaooqinn.kyuubi.server.KyuubiServer
|
||||
import yaooqinn.kyuubi.service.ServiceException
|
||||
import yaooqinn.kyuubi.utils.ReflectUtils
|
||||
|
||||
@ -81,6 +80,13 @@ class KyuubiAuthFactorySuite extends SparkFunSuite {
|
||||
assert(e.getMessage === "Unsupported authentication method: OTHER")
|
||||
}
|
||||
|
||||
test("AuthType LDAP") {
|
||||
val conf = new SparkConf(true).set(KyuubiConf.AUTHENTICATION_METHOD.key, "LDAP")
|
||||
KyuubiSparkUtil.setupCommonConfig(conf)
|
||||
val authFactory = new KyuubiAuthFactory(conf)
|
||||
assert(authFactory.getIpAddress.isEmpty)
|
||||
}
|
||||
|
||||
test("AuthType KERBEROS without keytab/principal") {
|
||||
val conf = new SparkConf(true).set(KyuubiConf.AUTHENTICATION_METHOD.key, "KERBEROS")
|
||||
KyuubiSparkUtil.setupCommonConfig(conf)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user