liuxiran commented on a change in pull request #964:
URL: https://github.com/apache/apisix-dashboard/pull/964#discussion_r535863204
##########
File path: api/internal/handler/route/route_test.go
##########
@@ -985,6 +985,32 @@ func TestRoute(t *testing.T) {
_, err = handler.BatchDelete(ctx)
assert.Nil(t, err)
+ route7 := &entity.Route{}
+ reqBody = `{
+ "id": "1",
+ "methods": ["GET"],
+ "upstream": {
+ "nodes": {
+ "httpbin.org:443": 1
+ },
+ "type": "roundrobin"
+ },
+ "desc": "new route",
+ "uri": "/get"
+ }`
+ err = json.Unmarshal([]byte(reqBody), route7)
+ assert.Nil(t, err)
+ ctx.SetInput(route7)
+ ret, err = handler.Create(ctx)
+ assert.NotNil(t, err)
+ portTransmit := &ParamsInput{}
+ // FIXME
+ reqBody = `{"url":"http://127.0.0.1:9080/get","method":"GET"}`
Review comment:
needs @nic-chen's help~
the fixed address is not appropriatly here, however, it is also not
appropriate to add a configuration item just for test case, do you have any
suggestions?
----------------------------------------------------------------
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]