membphis commented on a change in pull request #979:
URL: https://github.com/apache/apisix-dashboard/pull/979#discussion_r543388169



##########
File path: api/test/e2e/route_online_debug_test.go
##########
@@ -42,7 +42,7 @@ func TestRoute_Online_Debug_Route_Not_Exist(t *testing.T) {
                testCaseCheck(tc)
        }
        basepath := 
"http://127.0.0.1:9000/apisix/admin/debug-request-forwarding";
-       request, _ := http.NewRequest("POST", basepath, 
strings.NewReader(`{"url": "http://172.16.238.30:9080/hello_","method": 
"GET"}`))
+       request, _ := http.NewRequest("POST", basepath, 
strings.NewReader(`{"url": "http://172.16.238.30:9080/hello_","method": 
"GET","protocol": "http"}`))

Review comment:
       can we use `http://172.16.238.30` as a global variable? 

##########
File path: api/test/e2e/route_online_debug_test.go
##########
@@ -42,7 +42,7 @@ func TestRoute_Online_Debug_Route_Not_Exist(t *testing.T) {
                testCaseCheck(tc)
        }
        basepath := 
"http://127.0.0.1:9000/apisix/admin/debug-request-forwarding";
-       request, _ := http.NewRequest("POST", basepath, 
strings.NewReader(`{"url": "http://172.16.238.30:9080/hello_","method": 
"GET"}`))
+       request, _ := http.NewRequest("POST", basepath, 
strings.NewReader(`{"url": "http://172.16.238.30:9080/hello_","method": 
"GET","protocol": "http"}`))

Review comment:
       hard code is not a good way




----------------------------------------------------------------
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


Reply via email to