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/25 16:22:52 UTC

[GitHub] [apisix-dashboard] idbeta opened a new pull request #1128: WIP: add backend e2e test for service

idbeta opened a new pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] E2E test
   - [ ] New feature provided
   - [ ] Improve performance
   
   - Related issues
   


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



[GitHub] [apisix-dashboard] idbeta commented on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-755315932


   ping @nic-chen @membphis 


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



[GitHub] [apisix-dashboard] idbeta removed a comment on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
idbeta removed a comment on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-757654265


   ping @juzhiyuan Please remove the `Draft` tag of this PR.


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



[GitHub] [apisix-dashboard] juzhiyuan merged pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128


   


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



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-751268618


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=h1) Report
   > Merging [#1128](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=desc) (8ed9199) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/e5e59e2d38f7a799c296ffbdd6cb3ae221acd29b?el=desc) (e5e59e2) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1128   +/-   ##
   =======================================
     Coverage   42.44%   42.44%           
   =======================================
     Files          31       31           
     Lines        1932     1932           
   =======================================
     Hits          820      820           
     Misses       1001     1001           
     Partials      111      111           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=footer). Last update [e5e59e2...8ed9199](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [apisix-dashboard] idbeta commented on a change in pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#discussion_r554803093



##########
File path: api/test/e2e/service_test.go
##########
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+	"time"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestService(t *testing.T) {
+	tests := []HttpTestCase{
+		{
+			Desc:    "create service without plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1981,
+						"weight": 2
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1982,
+						"weight": 3
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"name\":\"testservice\",\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1},{\"host\":\"172.16.238.20\",\"port\":1981,\"weight\":2},{\"host\":\"172.16.238.20\",\"port\":1982,\"weight\":3}],\"type\":\"roundrobin\"}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes
+	time.Sleep(sleepTime)
+	// batch test /server_port api
+	res := BatchTestServerPort(t, 18)
+	assert.True(t, res["1980"] == 3)
+	assert.True(t, res["1981"] == 6)
+	assert.True(t, res["1982"] == 9)
+
+	tests = []HttpTestCase{
+		{
+			Desc:    "create service with plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"plugins": { 
+					"limit-count": { 
+						"count": 100, 
+						"time_window": 60, 
+						"rejected_code": 503, 
+						"key": "remote_addr" 
+					} 
+				},
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1}],\"type\":\"roundrobin\"},\"plugins\":{\"limit-count\":{\"count\":100,\"key\":\"remote_addr\",\"rejected_code\":503,\"time_window\":60}}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes and check the response header
+	time.Sleep(sleepTime)
+	basepath := "http://127.0.0.1:9080"
+	request, _ := http.NewRequest("GET", basepath+"/server_port", nil)
+	request.Header.Add("Authorization", token)
+	resp, err := http.DefaultClient.Do(request)
+	if err != nil {
+		fmt.Printf("server not responding %s", err.Error())

Review comment:
       fixed.

##########
File path: api/test/e2e/service_test.go
##########
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+	"time"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestService(t *testing.T) {
+	tests := []HttpTestCase{
+		{
+			Desc:    "create service without plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1981,
+						"weight": 2
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1982,
+						"weight": 3
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"name\":\"testservice\",\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1},{\"host\":\"172.16.238.20\",\"port\":1981,\"weight\":2},{\"host\":\"172.16.238.20\",\"port\":1982,\"weight\":3}],\"type\":\"roundrobin\"}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes

Review comment:
       fixed.




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



[GitHub] [apisix-dashboard] codecov-io commented on pull request #1128: WIP: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-751268618


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=h1) Report
   > Merging [#1128](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=desc) (17533db) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/cc9eb35db608142996fbba14c216181048182a1d?el=desc) (cc9eb35) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1128   +/-   ##
   =======================================
     Coverage   41.86%   41.86%           
   =======================================
     Files          29       29           
     Lines        1825     1825           
   =======================================
     Hits          764      764           
     Misses        953      953           
     Partials      108      108           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=footer). Last update [cc9eb35...17533db](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [apisix-dashboard] membphis commented on a change in pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#discussion_r554795005



##########
File path: api/test/e2e/service_test.go
##########
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+	"time"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestService(t *testing.T) {
+	tests := []HttpTestCase{
+		{
+			Desc:    "create service without plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1981,
+						"weight": 2
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1982,
+						"weight": 3
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"name\":\"testservice\",\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1},{\"host\":\"172.16.238.20\",\"port\":1981,\"weight\":2},{\"host\":\"172.16.238.20\",\"port\":1982,\"weight\":3}],\"type\":\"roundrobin\"}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes

Review comment:
       bad comment

##########
File path: api/test/e2e/service_test.go
##########
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+	"time"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestService(t *testing.T) {
+	tests := []HttpTestCase{
+		{
+			Desc:    "create service without plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1981,
+						"weight": 2
+					},
+					{
+						"host": "172.16.238.20",
+						"port": 1982,
+						"weight": 3
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"name\":\"testservice\",\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1},{\"host\":\"172.16.238.20\",\"port\":1981,\"weight\":2},{\"host\":\"172.16.238.20\",\"port\":1982,\"weight\":3}],\"type\":\"roundrobin\"}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes
+	time.Sleep(sleepTime)
+	// batch test /server_port api
+	res := BatchTestServerPort(t, 18)
+	assert.True(t, res["1980"] == 3)
+	assert.True(t, res["1981"] == 6)
+	assert.True(t, res["1982"] == 9)
+
+	tests = []HttpTestCase{
+		{
+			Desc:    "create service with plugin",
+			Object:  ManagerApiExpect(t),
+			Method:  http.MethodPut,
+			Path:    "/apisix/admin/services/s1",
+			Headers: map[string]string{"Authorization": token},
+			Body: `{
+				"name": "testservice",
+				"plugins": { 
+					"limit-count": { 
+						"count": 100, 
+						"time_window": 60, 
+						"rejected_code": 503, 
+						"key": "remote_addr" 
+					} 
+				},
+				"upstream": {
+					"type": "roundrobin",
+					"nodes": [{
+						"host": "172.16.238.20",
+						"port": 1980,
+						"weight": 1
+					}]
+				}
+			}`,
+			ExpectStatus: http.StatusOK,
+		},
+		{
+			Desc:       "get the service s1",
+			Object:     ManagerApiExpect(t),
+			Method:     http.MethodGet,
+			Path:       "/apisix/admin/services/s1",
+			Headers:    map[string]string{"Authorization": token},
+			ExpectCode: http.StatusOK,
+			ExpectBody: "\"upstream\":{\"nodes\":[{\"host\":\"172.16.238.20\",\"port\":1980,\"weight\":1}],\"type\":\"roundrobin\"},\"plugins\":{\"limit-count\":{\"count\":100,\"key\":\"remote_addr\",\"rejected_code\":503,\"time_window\":60}}",
+		},
+		{
+			Desc:   "create route using the service just created",
+			Object: ManagerApiExpect(t),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/r1",
+			Body: `{
+				"uri": "/server_port",
+				"service_id": "s1"
+			}`,
+			Headers:      map[string]string{"Authorization": token},
+			ExpectStatus: http.StatusOK,
+			Sleep:        sleepTime,
+		},
+	}
+	for _, tc := range tests {
+		testCaseCheck(tc, t)
+	}
+
+	// hit routes and check the response header
+	time.Sleep(sleepTime)
+	basepath := "http://127.0.0.1:9080"
+	request, _ := http.NewRequest("GET", basepath+"/server_port", nil)
+	request.Header.Add("Authorization", token)
+	resp, err := http.DefaultClient.Do(request)
+	if err != nil {
+		fmt.Printf("server not responding %s", err.Error())

Review comment:
       I think we should throw an error here




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



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1128: WIP: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-751268618


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=h1) Report
   > Merging [#1128](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=desc) (6369de7) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/3f8060ead988364972bb2a23f2bedd0dcb1e6ecd?el=desc) (3f8060e) will **increase** coverage by `0.05%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1128      +/-   ##
   ==========================================
   + Coverage   42.39%   42.44%   +0.05%     
   ==========================================
     Files          31       31              
     Lines        1932     1932              
   ==========================================
   + Hits          819      820       +1     
   + Misses       1002     1001       -1     
     Partials      111      111              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.00% <0.00%> (+0.62%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=footer). Last update [3f8060e...6369de7](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-751268618


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=h1) Report
   > Merging [#1128](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=desc) (52127db) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/40d8f97de8770187599ff5963617049603020e92?el=desc) (40d8f97) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1128   +/-   ##
   =======================================
     Coverage   42.44%   42.44%           
   =======================================
     Files          31       31           
     Lines        1932     1932           
   =======================================
     Hits          820      820           
     Misses       1001     1001           
     Partials      111      111           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=footer). Last update [40d8f97...52127db](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



[GitHub] [apisix-dashboard] idbeta commented on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-757654265


   ping @juzhiyuan Please remove the `Draft` tag of this PR.


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



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1128: test: add backend e2e test for service

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1128:
URL: https://github.com/apache/apisix-dashboard/pull/1128#issuecomment-751268618


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=h1) Report
   > Merging [#1128](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=desc) (e8e166a) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/3f8060ead988364972bb2a23f2bedd0dcb1e6ecd?el=desc) (3f8060e) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1128/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1128   +/-   ##
   =======================================
     Coverage   42.39%   42.39%           
   =======================================
     Files          31       31           
     Lines        1932     1932           
   =======================================
     Hits          819      819           
     Misses       1002     1002           
     Partials      111      111           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=footer). Last update [3f8060e...e8e166a](https://codecov.io/gh/apache/apisix-dashboard/pull/1128?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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