spacewander commented on a change in pull request #5589:
URL: https://github.com/apache/apisix/pull/5589#discussion_r755622646
##########
File path: t/admin/health-check.t
##########
@@ -469,17 +434,64 @@ GET /t
ngx.print(body)
}
}
---- request
-GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid configuration: property \"upstream\" validation failed:
property \"checks\" validation failed: object matches none of the requireds:
[\"active\"] or [\"active\",\"passive\"]"}
---- no_error_log
-[error]
-=== TEST 13: number type timeout
+=== TEST 13: only active
Review comment:
```suggestion
=== TEST 13: change active & passive to only active
```
##########
File path: apisix/schema_def.lua
##########
@@ -259,24 +259,38 @@ local health_checker = {
},
tcp_failures = {
type = "integer",
- minimum = 1,
+ minimum = 0,
maximum = 254,
default = 2
},
timeouts = {
type = "integer",
- minimum = 1,
+ minimum = 0,
maximum = 254,
default = 7
},
http_failures = {
type = "integer",
- minimum = 1,
+ minimum = 0,
maximum = 254,
default = 5
},
}
}
+ },
+ default = {
+ type = "http",
+ healthy = {
+ http_statuses = { 200, 201, 202, 203, 204, 205, 206, 207,
208, 226,
+ 300, 301, 302, 303, 304, 305, 306, 307,
308 },
+ successes = 0,
+ },
+ unhealthy = {
+ http_statuses = { 429, 500, 503 },
+ tcp_failures = 0,
Review comment:
Is it necessary to set a zero default? Do we need to update the doc?
--
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]