You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/14 06:38:36 UTC

[GitHub] [incubator-kyuubi] TyrealBM commented on a change in pull request #1232: [KYUUBI #1209] kyuubi.engine.share.level.subdomain can be more tolerant

TyrealBM commented on a change in pull request #1232:
URL: https://github.com/apache/incubator-kyuubi/pull/1232#discussion_r728676721



##########
File path: kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala
##########
@@ -150,4 +150,25 @@ class KyuubiConfSuite extends KyuubiFunSuite {
     val e1 = intercept[IllegalArgumentException](kyuubiConf.get(OPERATION_QUERY_TIMEOUT))
     assert(e1.getMessage.contains("must >= 1s if set"))
   }
+
+  test("kyuubi conf engine.share.level.subdomain valid path test") {
+    val kyuubiConf = KyuubiConf()
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, ".")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "..")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "/")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "/tmp/")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "tmp/")
+    assertThrows[IllegalArgumentException](kyuubiConf.get(ENGINE_SHARE_LEVEL_SUBDOMAIN))
+    kyuubiConf.set(ENGINE_SHARE_LEVEL_SUBDOMAIN, "/tmp")

Review comment:
       Ok! It has been added to the unit test




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org