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 2022/03/17 11:35:49 UTC

[GitHub] [apisix-go-plugin-runner] Chever-John opened a new pull request #72: feat(ci): add e2e test framework

Chever-John opened a new pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72


    add e2e test framework


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] Chever-John commented on a change in pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
Chever-John commented on a change in pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#discussion_r830806594



##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+	"net/http"
+)
+
+var _ = ginkgo.Describe("limit req Plugin, then", func() {
+	table.DescribeTable("limit req",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("let go plugin limit req", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit_req",
+								"value":"{\"rate\":5, \"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("test go runner limit req", tools.HttpTestCase{

Review comment:
       finish it




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] Chever-John commented on a change in pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
Chever-John commented on a change in pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#discussion_r830806525



##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+	"net/http"
+)
+
+var _ = ginkgo.Describe("limit req Plugin, then", func() {
+	table.DescribeTable("limit req",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("let go plugin limit req", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit_req",
+								"value":"{\"rate\":5, \"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("test go runner limit req", tools.HttpTestCase{
+			Object:       tools.GetA6Expect(),
+			Method:       http.MethodGet,
+			Path:         "/test/go/runner/limitreq",
+			ExpectCode: 503,
+			// ExpectStatus: http.StatusCreated,

Review comment:
       Finish it!




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (795f98d) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `2.42%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   78.41%   -2.43%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      585      +11     
   - Misses        100      122      +22     
   - Partials       36       39       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `50.40% <0.00%> (-17.08%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...795f98d](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter commented on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (81bbec6) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **increase** coverage by `0.38%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   + Coverage   80.84%   81.23%   +0.38%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      606      +32     
   - Misses        100      102       +2     
   - Partials       36       38       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...81bbec6](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] shuaijinchao merged pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
shuaijinchao merged pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72


   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter commented on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (81bbec6) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **increase** coverage by `0.38%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   + Coverage   80.84%   81.23%   +0.38%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      606      +32     
   - Misses        100      102       +2     
   - Partials       36       38       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...81bbec6](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3ec297) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.62%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.22%   -1.63%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      591      +17     
   - Misses        100      115      +15     
   - Partials       36       40       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `55.28% <0.00%> (-12.20%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...f3ec297](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (201f806) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.35%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.49%   -1.36%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      593      +19     
   - Misses        100      114      +14     
   - Partials       36       39       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `56.91% <0.00%> (-10.57%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...201f806](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f45b767) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.35%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.49%   -1.36%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      593      +19     
   - Misses        100      114      +14     
   - Partials       36       39       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `56.91% <0.00%> (-10.57%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...f45b767](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ebf4a9f) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.35%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.49%   -1.36%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      593      +19     
   - Misses        100      114      +14     
   - Partials       36       39       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `56.91% <0.00%> (-10.57%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...ebf4a9f](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] spacewander commented on a change in pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#discussion_r837056258



##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"net/http"
+
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+)
+
+var _ = ginkgo.Describe("Limit-req Plugin", func() {
+	table.DescribeTable("tries to test limit-req feature.",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("Config APISIX.", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit-req",
+								"value":"{\"rate\":5,\"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("Test if limit-req plugin work.", tools.HttpTestCase{

Review comment:
       The limit-req test doesn't test the limit req behavior...

##########
File path: .github/workflows/runner-e2e.yml
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+
+name: Runner E2E Test
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  run-test:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: setup go
+      uses: actions/setup-go@v2.1.5
+      with:
+        go-version: '1.17'
+
+    - name: build runner
+      run: |
+        make build
+
+    - name: startup runner
+      run: |
+        APISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock APISIX_CONF_EXPIRE_TIME=3600 ./go-runner run &

Review comment:
       Is it possible to let APISIX manage the go-runner, just like in the product environment?

##########
File path: ci/docker-compose.yml
##########
@@ -0,0 +1,64 @@
+#
+# 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.
+#
+
+version: "3"
+
+services:
+  apisix:
+    image: apache/apisix:dev
+    restart: always
+    volumes:
+      - ./apisix/config.yaml:/usr/local/apisix/conf/config.yaml:ro
+      - /tmp/runner.sock:/tmp/runner.sock
+    depends_on:
+      - etcd
+    ports:
+      - "9080:9080/tcp"
+      - "9091:9091/tcp"
+      - "9443:9443/tcp"
+      - "9092:9092/tcp"
+    networks:
+      apisix:
+
+  etcd:
+    image: bitnami/etcd:3.4.9
+    restart: always
+    environment:
+      ETCD_ENABLE_V2: "true"
+      ALLOW_NONE_AUTHENTICATION: "yes"
+      ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
+      ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
+    ports:
+      - "2379:2379/tcp"
+    networks:
+      apisix:
+
+  web:
+    image: mendhak/http-https-echo
+    environment:
+      HTTP_PORT: 8888
+      HTTPS_PORT: 9999

Review comment:
       The HTTPS port is unused.




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] shuaijinchao commented on a change in pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on a change in pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#discussion_r830709820



##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+	"net/http"
+)
+
+var _ = ginkgo.Describe("limit req Plugin, then", func() {
+	table.DescribeTable("limit req",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("let go plugin limit req", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit_req",
+								"value":"{\"rate\":5, \"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("test go runner limit req", tools.HttpTestCase{
+			Object:       tools.GetA6Expect(),
+			Method:       http.MethodGet,
+			Path:         "/test/go/runner/limitreq",
+			ExpectCode: 503,

Review comment:
       ```suggestion
   			ExpectCode: 503,
   			ExpectCode: http.StatusServiceUnavailable,
   ```

##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+	"net/http"
+)
+
+var _ = ginkgo.Describe("limit req Plugin, then", func() {
+	table.DescribeTable("limit req",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("let go plugin limit req", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit_req",
+								"value":"{\"rate\":5, \"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("test go runner limit req", tools.HttpTestCase{

Review comment:
       Need to add tests for non-503 cases.

##########
File path: tests/e2e/plugins/plugins_limit_req_test.go
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package plugins_test
+
+import (
+	"github.com/apache/apisix-go-plugin-runner/tests/e2e/tools"
+	"github.com/gavv/httpexpect/v2"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/ginkgo/extensions/table"
+	"net/http"
+)
+
+var _ = ginkgo.Describe("limit req Plugin, then", func() {
+	table.DescribeTable("limit req",
+		func(tc tools.HttpTestCase) {
+			tools.RunTestCase(tc)
+		},
+		table.Entry("let go plugin limit req", tools.HttpTestCase{
+			Object: tools.GetA6Expect(),
+			Method: http.MethodPut,
+			Path:   "/apisix/admin/routes/1",
+			Body: `{
+				"uri":"/test/go/runner/limitreq",
+				"plugins":{
+					"ext-plugin-pre-req":{
+						"conf":[
+							{
+								"name":"limit_req",
+								"value":"{\"rate\":5, \"burst\":1}"
+							}
+						]
+					}
+				},
+				"upstream":{
+					"nodes":{
+						"web:8888":1
+					},
+					"type":"roundrobin"
+				}
+			}`,
+			Headers:           map[string]string{"X-API-KEY": tools.GetAdminToken()},
+			ExpectStatusRange: httpexpect.Status2xx,
+		}),
+		table.Entry("test go runner limit req", tools.HttpTestCase{
+			Object:       tools.GetA6Expect(),
+			Method:       http.MethodGet,
+			Path:         "/test/go/runner/limitreq",
+			ExpectCode: 503,
+			// ExpectStatus: http.StatusCreated,

Review comment:
       remove




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3ec297) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.62%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.22%   -1.63%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      591      +17     
   - Misses        100      115      +15     
   - Partials       36       40       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `55.28% <0.00%> (-12.20%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...f3ec297](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-go-plugin-runner] codecov-commenter edited a comment on pull request #72: feat(ci): add e2e test framework

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #72:
URL: https://github.com/apache/apisix-go-plugin-runner/pull/72#issuecomment-1070826647


   # [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#72](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6a0a1f) into [master](https://codecov.io/gh/apache/apisix-go-plugin-runner/commit/8fdac12de1d573a5505ce1068eb5ec2943200441?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fdac12) will **decrease** coverage by `1.35%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #72      +/-   ##
   ==========================================
   - Coverage   80.84%   79.49%   -1.36%     
   ==========================================
     Files          11       11              
     Lines         710      746      +36     
   ==========================================
   + Hits          574      593      +19     
   - Misses        100      114      +14     
   - Partials       36       39       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [internal/server/server.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvc2VydmVyL3NlcnZlci5nbw==) | `56.91% <0.00%> (-10.57%)` | :arrow_down: |
   | [internal/http/request.go](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW50ZXJuYWwvaHR0cC9yZXF1ZXN0Lmdv) | `93.49% <0.00%> (-0.79%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8fdac12...f6a0a1f](https://codecov.io/gh/apache/apisix-go-plugin-runner/pull/72?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org