liuxiran commented on a change in pull request #450: URL: https://github.com/apache/apisix-dashboard/pull/450#discussion_r488259506
########## File path: api/route/route_test.go ########## @@ -98,39 +153,41 @@ func TestCreateRouteWithCreateNewGroup(t *testing.T) { "vars":[], "upstream":{"type":"roundrobin","nodes":{"127.0.0.1:443":1}, "timeout":{"connect":6000,"send":6000,"read":6000}}, - "upstream_header":{}, - "route_group_id":"", - "route_group_name":"route-create-test-create-group" + "upstream_header":{} }`).Expect(t). - Status(http.StatusOK). - End() + Status(http.StatusOK). + End() + route, _ := getRouteByName("api-test") + // publish route + handler.Put(uriPrefix + "/routes/" + route.ID.String() + "/publish").Expect(t).Status(http.StatusOK).End() } -func TestCreateRouteWithDuplicateGroupName(t *testing.T) { - // create route with duplicate route group name +func TestOfflineRoute(t *testing.T) { + // create route handler.Post(uriPrefix+"/routes"). Header("Authorization", token). JSON(`{ - "name":"api-test", - "desc":"api-test", + "name":"api-test-published", + "desc":"", "priority":0, "protocols":["http"], - "hosts":["test.com"], + "hosts":["test1.com"], "paths":["/*"], "methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"], - "status":false, + "status":true, Review comment: create a route online first, then we could do `offline` :) ---------------------------------------------------------------- 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: us...@infra.apache.org