diff --git a/apisix/cli/schema.lua b/apisix/cli/schema.lua index 5f1f789addda..477e2ce7e56d 100644 --- a/apisix/cli/schema.lua +++ b/apisix/cli/schema.lua @@ -375,6 +375,7 @@ local deployment_schema = { control_plane = { properties = { etcd = etcd_schema, + admin = admin_schema, role_control_plane = { properties = { config_provider = { diff --git a/t/cli/test_deployment_control_plane.sh b/t/cli/test_deployment_control_plane.sh index fa7210378da4..58858f41fd1c 100755 --- a/t/cli/test_deployment_control_plane.sh +++ b/t/cli/test_deployment_control_plane.sh @@ -40,6 +40,36 @@ 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: + https_admin: "abc" + 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 'property "https_admin" validation failed: wrong type: expected boolean, got string'; then + echo "failed: should check deployment schema during init" + exit 1 +fi + +echo "passed: should check deployment schema during init" + # The 'admin.apisix.dev' is injected by ci/common.sh@set_coredns echo ' apisix: