fix: remove the restriction of etcd prefix (#7675) master
author罗泽轩 <spacewanderlzx@gmail.com>
Mon, 15 Aug 2022 09:25:41 +0000 (17:25 +0800)
committerGitHub <noreply@github.com>
Mon, 15 Aug 2022 09:25:41 +0000 (17:25 +0800)
apisix/cli/schema.lua
t/cli/test_validate_config.sh

index fa76326a943641391a079cdc75a43ca1e7ec9833..8c38a305f5052257235eb1fb64ae57352ae09cea 100644 (file)
@@ -47,7 +47,6 @@ local etcd_schema = {
         },
         prefix = {
             type = "string",
-            pattern = [[^/[^/]+$]]
         },
         host = {
             type = "array",
index 216f1d9fb14d8b2b953d65dab21f6d11951cd43d..1a7b0c3bed8d86aad1b9295b98f0a2156738b0e6 100755 (executable)
@@ -215,17 +215,4 @@ if ! echo "$out" | grep 'property "host" validation failed'; then
     exit 1
 fi
 
-echo '
-etcd:
-    prefix: "/apisix/"
-    host:
-        - https://127.0.0.1
-' > conf/config.yaml
-
-out=$(make init 2>&1 || true)
-if ! echo "$out" | grep 'property "prefix" validation failed'; then
-    echo "failed: should check etcd schema during init"
-    exit 1
-fi
-
 echo "passed: check etcd schema during init"