You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/04 07:06:15 UTC

[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #964: WIP: Refactor online debug

nic-chen commented on a change in pull request #964:
URL: https://github.com/apache/apisix-dashboard/pull/964#discussion_r535880445



##########
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:
       @liuxiran 
   I think this should be E2E test, not unit test.
   
   we could finish the job on APISIX then go ahead with this.
   




----------------------------------------------------------------
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:
users@infra.apache.org