gxthrj commented on a change in pull request #1063:
URL: https://github.com/apache/apisix-dashboard/pull/1063#discussion_r548517329
##########
File path: api/test/e2e/id_compatible_test.go
##########
@@ -335,3 +335,73 @@ func TestID_Crossing(t *testing.T) {
testCaseCheck(tc, t)
}
}
+
+func TestID_Not_In_Body(t *testing.T) {
+ tests := []HttpTestCase{
+ {
+ caseDesc: "make sure the route is not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ Sleep: sleepTime,
+ },
+ {
+ caseDesc: "create route that has no ID in request body
by admin api",
+ Object: APISIXExpect(t),
+ Method: http.MethodPut,
+ Path: "/apisix/admin/routes/r1",
Review comment:
Let me remind the issue in
https://github.com/apache/apisix-ingress-controller/issues/125.
This is a scene like this:
1. Add route with POST method ( admin api), APISIX will generate an id ,
such as `00000000000000000274 `;
2. And then read the Route from dashboard, the id is empty( id = "");
I think we should test the POST scenario.
----------------------------------------------------------------
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]