apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

bug: create route with error format remote_addrs manager-api will return 200, but should return 400

Open idbeta opened this issue 6 years ago • 1 comments

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.

idbeta avatar Nov 25 '20 11:11 idbeta

close by #899

nic-chen avatar Nov 29 '20 15:11 nic-chen