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 2021/01/27 07:05:15 UTC

[GitHub] [apisix-dashboard] Jaycean opened a new pull request #1381: Add back end E2E test document

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


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   #1380 
   ___
   ### New feature or improvement
   - Add back-end E2E test environment construction and test steps
   
   


----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (0d554e7) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `19.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   45.68%   -19.75%     
   ===========================================
     Files          43       34        -9     
     Lines        2655     2235      -420     
   ===========================================
   - Hits         1737     1021      -716     
   - Misses        713     1079      +366     
   + Partials      205      135       -70     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-81.25%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `20.16% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `45.53% <0.00%> (-31.92%)` | :arrow_down: |
   | ... and [29 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...11037b6](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (0d554e7) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **increase** coverage by `0.15%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1381      +/-   ##
   ==========================================
   + Coverage   65.42%   65.57%   +0.15%     
   ==========================================
     Files          43       43              
     Lines        2655     2655              
   ==========================================
   + Hits         1737     1741       +4     
   + Misses        713      706       -7     
   - Partials      205      208       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `46.46% <0.00%> (-2.03%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `87.34% <0.00%> (+1.26%)` | :arrow_up: |
   | [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `60.29% <0.00%> (+5.88%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...11037b6](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (130a16b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `19.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   45.68%   -19.75%     
   ===========================================
     Files          43       34        -9     
     Lines        2655     2235      -420     
   ===========================================
   - Hits         1737     1021      -716     
   - Misses        713     1079      +366     
   + Partials      205      135       -70     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-81.25%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `20.16% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `45.53% <0.00%> (-31.92%)` | :arrow_down: |
   | ... and [29 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...130a16b](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] Jaycean commented on pull request #1381: docs: Add back end E2E test document

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


   At present, the document only provides a separate use of docker to start upstream node. Manage-API, and admin-API to start using source code. I plan to update the document of using docker-compose to start E2E cluster.


----------------------------------------------------------------
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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.

Review comment:
       ```suggestion
   This document describes how to run E2E test locally.
   ```




----------------------------------------------------------------
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] starsz commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "test",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+            },
+            "type": "roundrobin"
+         }
+    }
+
+     # GitHub E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "test",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                "172.16.238.20:1981": 1
+            },
+            "type": "roundrobin"
+         }
+    }
+   ```
+
+8. Enter the E2E folder and execute the command to test all E2E test files.
+
+   ```sh
+    cd /(Your apisix-dashboard folder path)/api/test/e2e
+    go test -v
+   ```
+
+9. You can also do E2E test on a single file.
+
+   ```sh
+    cd /(Your apisix-dashboard folder path)/api/test/e2e
+    go test -v E2E-test-file.go base.go
+   ```

Review comment:
       Hello, IMO, sometimes we need the delete the etcd store info, otherwise, it will make the test failed.
   I think this can also be added to the doc.




----------------------------------------------------------------
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] imjoey commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+                        },
+            "type": "roundrobin"
+            }
+    }
+
+     # GitHub E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",

Review comment:
       @Jaycean we would better use English words here. Thanks.




----------------------------------------------------------------
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] imjoey commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       @Jaycean current doc is awesome. Thanks for the update.




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (24c3a29) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `10.24%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   55.17%   -10.25%     
   ===========================================
     Files          43       43               
     Lines        2655     2655               
   ===========================================
   - Hits         1737     1465      -272     
   - Misses        713      964      +251     
   - Partials      205      226       +21     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/plugin/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luL3BsdWdpbi5nbw==) | `16.66% <0.00%> (-70.00%)` | :arrow_down: |
   | [api/internal/core/store/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvcXVlcnkuZ28=) | `45.23% <0.00%> (-52.39%)` | :arrow_down: |
   | [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/core/store/selector.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc2VsZWN0b3IuZ28=) | `40.74% <0.00%> (-46.30%)` | :arrow_down: |
   | [api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | `44.11% <0.00%> (-32.36%)` | :arrow_down: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `56.32% <0.00%> (-29.75%)` | :arrow_down: |
   | [api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=) | `64.51% <0.00%> (-19.36%)` | :arrow_down: |
   | [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `74.46% <0.00%> (-17.03%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `60.85% <0.00%> (-16.60%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `33.33% <0.00%> (-14.82%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...f4ee2a6](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] nic-chen commented on a change in pull request #1381: docs: Add back end E2E test document

Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1381:
URL: https://github.com/apache/apisix-dashboard/pull/1381#discussion_r566022964



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,108 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.

Review comment:
       should be APISIX,not admin api




----------------------------------------------------------------
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] nic-chen commented on a change in pull request #1381: docs: Add back end E2E test document

Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1381:
URL: https://github.com/apache/apisix-dashboard/pull/1381#discussion_r566200383



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       I use docker-compose to run local e2e testing. when I update the main code, just delete the image of Manager API and let it rebuild. building the image of Manager API only takes a little time.
   
   




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (36ec862) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **increase** coverage by `0.14%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1381      +/-   ##
   ==========================================
   + Coverage   65.42%   65.56%   +0.14%     
   ==========================================
     Files          43       44       +1     
     Lines        2655     2933     +278     
   ==========================================
   + Hits         1737     1923     +186     
   - Misses        713      778      +65     
   - Partials      205      232      +27     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `67.07% <0.00%> (-4.14%)` | :arrow_down: |
   | [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `44.44% <0.00%> (-4.05%)` | :arrow_down: |
   | [api/internal/conf/conf.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvbmYvY29uZi5nbw==) | `67.85% <0.00%> (ø)` | |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `55.46% <0.00%> (ø)` | |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `64.91% <0.00%> (ø)` | |
   | [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | `69.27% <0.00%> (+0.34%)` | :arrow_up: |
   | [api/internal/handler/data\_loader/route\_export.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfZXhwb3J0Lmdv) | `69.17% <0.00%> (+0.47%)` | :arrow_up: |
   | [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `84.84% <0.00%> (+0.47%)` | :arrow_up: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `86.66% <0.00%> (+0.59%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...36ec862](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] Jaycean commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.

Review comment:
       done




----------------------------------------------------------------
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] Jaycean commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+                        },
+            "type": "roundrobin"
+            }
+    }
+
+     # GitHub E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",

Review comment:
       done,thks




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (929263e) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `21.68%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   43.74%   -21.69%     
   ===========================================
     Files          43       35        -8     
     Lines        2655     2508      -147     
   ===========================================
   - Hits         1737     1097      -640     
   - Misses        713     1254      +541     
   + Partials      205      157       -48     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-81.25%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `20.16% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `45.53% <0.00%> (-31.92%)` | :arrow_down: |
   | ... and [30 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...929263e](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] juzhiyuan merged pull request #1381: docs: Add back end E2E test document

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


   


----------------------------------------------------------------
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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.

Review comment:
       ```suggestion
   1. To run back end E2E test, please start the `manage-api`, `admin-api`, etcd and upstream node at first.
   ```




----------------------------------------------------------------
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] starsz commented on pull request #1381: docs: Add back end E2E test document

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


   @juzhiyuan @LiteSun Please take a look at the FE test.


----------------------------------------------------------------
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] LiteSun edited a comment on pull request #1381: docs: Add back end E2E test document

Posted by GitBox <gi...@apache.org>.
LiteSun edited a comment on pull request #1381:
URL: https://github.com/apache/apisix-dashboard/pull/1381#issuecomment-769525482


   > @juzhiyuan @LiteSun Please take a look at the FE test.
   
   ok. 
   
   ping @guoqqqi https://github.com/apache/apisix-dashboard/pull/1381/checks?check_run_id=1788500888


----------------------------------------------------------------
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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+                        },
+            "type": "roundrobin"
+            }

Review comment:
       it would be better to format the code




----------------------------------------------------------------
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] Jaycean commented on pull request #1381: docs: Add back end E2E test document

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


   At present, using the source code to start this method needs to modify the E2E test IP, the implementation method is not very friendly, do you have better suggestions?
   cc @nic-chen @starsz @imjoey 


----------------------------------------------------------------
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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.

Review comment:
       ```suggestion
   4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
   ```




----------------------------------------------------------------
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] starsz commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       Good. Using docker-compose for E2E is a better 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:
users@infra.apache.org



[GitHub] [apisix-dashboard] Jaycean commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "test",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+            },
+            "type": "roundrobin"
+         }
+    }
+
+     # GitHub E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "test",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                "172.16.238.20:1981": 1
+            },
+            "type": "roundrobin"
+         }
+    }
+   ```
+
+8. Enter the E2E folder and execute the command to test all E2E test files.
+
+   ```sh
+    cd /(Your apisix-dashboard folder path)/api/test/e2e
+    go test -v
+   ```
+
+9. You can also do E2E test on a single file.
+
+   ```sh
+    cd /(Your apisix-dashboard folder path)/api/test/e2e
+    go test -v E2E-test-file.go base.go
+   ```

Review comment:
       Done. Very good advice. Thks. I added a note to remind developers.




----------------------------------------------------------------
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] imjoey commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       > I use docker-compose to run local e2e testing. when I update the main code, just delete the image of Manager API and let it rebuild. building the image of Manager API only takes a little time.
   
   @nic-chen yep, from my perspective, yours is much better and even easier. Thanks for sharing.




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (f4ee2a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `19.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   45.68%   -19.75%     
   ===========================================
     Files          43       34        -9     
     Lines        2655     2235      -420     
   ===========================================
   - Hits         1737     1021      -716     
   - Misses        713     1079      +366     
   + Partials      205      135       -70     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-81.25%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `20.16% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `45.53% <0.00%> (-31.92%)` | :arrow_down: |
   | ... and [29 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...f4ee2a6](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (929263e) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **increase** coverage by `0.53%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1381      +/-   ##
   ==========================================
   + Coverage   65.42%   65.96%   +0.53%     
   ==========================================
     Files          43       44       +1     
     Lines        2655     2929     +274     
   ==========================================
   + Hits         1737     1932     +195     
   - Misses        713      766      +53     
   - Partials      205      231      +26     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `67.07% <0.00%> (-4.14%)` | :arrow_down: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `86.06% <0.00%> (-0.02%)` | :arrow_down: |
   | [api/internal/conf/conf.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvbmYvY29uZi5nbw==) | `67.85% <0.00%> (ø)` | |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `55.46% <0.00%> (ø)` | |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `64.91% <0.00%> (ø)` | |
   | [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | `69.27% <0.00%> (+0.34%)` | :arrow_up: |
   | [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `84.84% <0.00%> (+0.47%)` | :arrow_up: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `74.48% <0.00%> (+4.08%)` | :arrow_up: |
   | [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `60.29% <0.00%> (+5.88%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...929263e](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] Jaycean commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       I updated the steps of using docker compose for E2E testing. It's really unfriendly to start the method locally according to the source code, so is this method left for developers to choose, or is it just run with docker compose?

##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,108 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.

Review comment:
       done




----------------------------------------------------------------
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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.

Review comment:
       ```suggestion
   2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
   ```




----------------------------------------------------------------
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] Jaycean commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.

Review comment:
       done

##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.

Review comment:
       done

##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.

Review comment:
       done

##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the admin-API project locally, please refer to [admin-API start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+                        },
+            "type": "roundrobin"
+            }

Review comment:
       done




----------------------------------------------------------------
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] imjoey commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,106 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+## Start with source code
+
+1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
+
+2. To start the `manager-api` project locally, please refer to [develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md) web section.
+
+4. To start the `admin-api` project locally, please refer to [admin-api start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 -p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 --ip 172.16.238.20 johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.

Review comment:
       @Jaycean Since within this step, developers are required to change every single occurrence for IP address of upstream nodes. Cause I believe that we need to cover all test cases even for only few changes. So I'm afraid this is not a rather practical way. How about just guide developers to setup docker-compose environment for local e2e testing? Thanks.




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (36ec862) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **decrease** coverage by `21.55%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1381       +/-   ##
   ===========================================
   - Coverage   65.42%   43.86%   -21.56%     
   ===========================================
     Files          43       35        -8     
     Lines        2655     2512      -143     
   ===========================================
   - Hits         1737     1102      -635     
   - Misses        713     1253      +540     
   + Partials      205      157       -48     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-81.25%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `20.16% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `45.53% <0.00%> (-31.92%)` | :arrow_down: |
   | ... and [30 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...36ec862](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] liuxiran commented on a change in pull request #1381: docs: Add back end E2E test document

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



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, etcd and upstream node.

Review comment:
       ```suggestion
   1. To run back end E2E test, please start the `manager-api`, `admin-api`, etcd and upstream node at first.
   ```




----------------------------------------------------------------
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 #1381: docs: Add back end E2E test document

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=h1) Report
   > Merging [#1381](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=desc) (f4ee2a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/9cb9aa7354d6daf231af689c80e3ca79234a0605?el=desc) (9cb9aa7) will **increase** coverage by `0.52%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1381      +/-   ##
   ==========================================
   + Coverage   65.42%   65.95%   +0.52%     
   ==========================================
     Files          43       43              
     Lines        2655     2655              
   ==========================================
   + Hits         1737     1751      +14     
   + Misses        713      696      -17     
   - Partials      205      208       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `87.34% <0.00%> (+1.26%)` | :arrow_up: |
   | [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `52.52% <0.00%> (+4.04%)` | :arrow_up: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `74.48% <0.00%> (+4.08%)` | :arrow_up: |
   | [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1381/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `60.29% <0.00%> (+5.88%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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/1381?src=pr&el=footer). Last update [9cb9aa7...f4ee2a6](https://codecov.io/gh/apache/apisix-dashboard/pull/1381?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] LiteSun commented on pull request #1381: docs: Add back end E2E test document

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


   > @juzhiyuan @LiteSun Please take a look at the FE test.
   
   ok


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