idbeta edited a comment on issue #568: URL: https://github.com/apache/apisix-dashboard/issues/568#issuecomment-734043715
error format of`env`
```
{
caseDesc: "create consumers with invalid format of label value",
Object: MangerApiExpect(t),
Path: "/apisix/admin/consumers",
Method: http.MethodPost,
Body: `{
"username":"case_10",
"desc": "new consumer",
"labels": {
"env": ["production", "release"]
}
}`,
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusBadRequest,
},
```
miss` ,` in json
```
{
Object: MangerApiExpect(t),
Method: http.MethodPut,
Path: "/apisix/admin/routes/r1",
Body: `{
"uris": ["/hello","/status"]
"upstream": {
"type": "roundrobin",
"nodes": [{
"host": "172.16.238.20",
"port": 1980,
"weight": 1
}]
}
}`,
Headers: map[string]string{"Authorization": token},
ExpectStatus: http. StatusBadRequest,
Sleep: sleepTime,
}
```
bad `methods`
```
{
caseDesc: "add route with invalid uri",
Object: MangerApiExpect(t),
Method: http.MethodPut,
Path: "/apisix/admin/routes/r1",
Body: `{
"uri": "/hello",
"methods": [99999999999999999],
"upstream": {
"type": "roundrobin",
"nodes": [{
"host":
"172.16.238.20",
"port": 1980,
"weight": 1
}]
}
}`,
Headers: map[string]string{"Authorization":
token},
ExpectStatus: http. StatusBadRequest,
},
```
bad `priority`
```
{
caseDesc: "add route with invalid data type priority",
Object: MangerApiExpect(t),
Method: http.MethodPut,
Path: "/apisix/admin/routes/r1",
Body: `{
"uri": "/hello",
"priority": "dfssdfs",
"upstream": {
"type": "roundrobin",
"nodes": [{
"host":
"172.16.238.20",
"port": 1980,
"weight": 1
}]
}
}`,
Headers: map[string]string{"Authorization":
token},
ExpectStatus: http.StatusBadRequest,
},
```
it return 200 now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
