spacewander commented on code in PR #8809:
URL: https://github.com/apache/apisix/pull/8809#discussion_r1103938239


##########
t/cli/test_deployment_control_plane.sh:
##########
@@ -40,6 +40,37 @@ fi
 
 echo "passed: should check deployment schema during init"
 
+# The 'admin.apisix.dev' is injected by ci/common.sh@set_coredns
+echo '
+apisix:
+    enable_admin: false
+deployment:
+    role: control_plane
+    role_control_plane:
+        config_provider: etcd
+        conf_server:
+            listen: admin.apisix.dev:12345
+            cert: t/certs/mtls_server.crt
+            cert_key: t/certs/mtls_server.key
+    admin:
+      admin_listen:
+        port: "abcd"
+    etcd:
+        prefix: "/apisix"
+        host:
+            - http://127.0.0.1:2379
+    certs:
+        trusted_ca_cert: t/certs/mtls_ca.crt
+' > conf/config.yaml
+
+out=$(make init 2>&1 || true)
+if ! echo "$out" | grep 'expect: number, but got: string'; then

Review Comment:
   The err is from there: 
https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/apisix/cli/file.lua#L180
   It is detected before the schema check.
   We should find another way to validate the schema check.



##########
apisix/cli/schema.lua:
##########
@@ -409,7 +410,7 @@ local deployment_schema = {
                 default = {},
             },
         },
-        required = {"etcd", "role_control_plane"}
+        required = {"etcd", "admin", "role_control_plane"}

Review Comment:
   The admin is not required as we always have a default value.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to