apisix-dashboard
apisix-dashboard copied to clipboard
bug: create route with error format remote_addrs manager-api will return 200, but should return 400
Bug report
Describe the bug
manager-api shuold not allow create route with error format remote_addrs
How to Reproduce
{
caseDesc: "config route with invalid remote_addrs",
Object: MangerApiExpect(t),
Method: http.MethodPut,
Path: "/apisix/admin/routes/r1",
Body: `{
"uri": "/test_uri",
"remote_addrs": "127.0.0.1",
"upstream": {
"type": "roundrobin",
"nodes": {
"172.16.238.20:1980": 1
}
}
}`,
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusBadRequest,
},
It is return 200 now.
close by #899