You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/30 06:55:42 UTC
[GitHub] [apisix-dashboard] nic-chen opened a new pull request #913: test: add e2e test for config route with plugin orchestration
nic-chen opened a new pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
- [ ] New feature provided
- [ ] Improve performance
- [x] E2E test
- Related issues
close #637
----------------------------------------------------------------
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] gxthrj commented on a change in pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
gxthrj commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532444122
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
Review comment:
Should we point out where it is invalid ? Or we can comment 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] gxthrj commented on pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
gxthrj commented on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735659011
CI FAILED
----------------------------------------------------------------
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 pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735707528
> CI FAILED
it's ok now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] membphis commented on a change in pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532405348
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
+ assert.Nil(t, err)
+ invalidDagConf := string(bytes)
+
+ tests := []HttpTestCase{
+ {
+ caseDesc: "make sure the route is not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ },
+ {
+ caseDesc: "create route with invalid dag conf",
Review comment:
what means `conf`? Avoid abbreviations.
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
+ assert.Nil(t, err)
+ invalidDagConf := string(bytes)
+
+ tests := []HttpTestCase{
+ {
+ caseDesc: "make sure the route is not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ },
+ {
+ caseDesc: "create route with invalid dag conf",
+ Object: MangerApiExpect(t),
+ Method: http.MethodPut,
+ Path: "/apisix/admin/routes/r1",
+ Body: invalidDagConf,
+ Headers: map[string]string{"Authorization": token},
+ ExpectStatus: http.StatusBadRequest,
+ },
+ {
+ caseDesc: "make sure the route created failed",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ Sleep: sleepTime,
+ },
+ {
+ caseDesc: "create route with correct dag cof",
Review comment:
what means `cof`?
----------------------------------------------------------------
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 pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735679504
> `api/test/testdata/dag-conf.json`
> Is it better to put it in this directory `/api/test/e2e/testdata/`?
I think `api/test/testdata/dag-conf.json` is 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
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (e845cd4) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **decrease** coverage by `0.21%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
==========================================
- Coverage 43.03% 42.82% -0.22%
==========================================
Files 18 18
Lines 1271 1289 +18
==========================================
+ Hits 547 552 +5
- Misses 632 645 +13
Partials 92 92
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `51.61% <0.00%> (-7.65%)` | :arrow_down: |
| [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.65% <0.00%> (-0.61%)` | :arrow_down: |
| [api/internal/core/entity/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L3F1ZXJ5Lmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (ø)` | |
| [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `34.92% <0.00%> (ø)` | |
| [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `46.56% <0.00%> (+0.11%)` | :arrow_up: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.22% <0.00%> (+0.27%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...31a452e](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] idbeta commented on pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735618112
`api/test/testdata/dag-conf.json`
Is it better to put it in this directory `/api/test/e2e/testdata/`?
----------------------------------------------------------------
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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532426330
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
+ assert.Nil(t, err)
+ invalidDagConf := string(bytes)
+
+ tests := []HttpTestCase{
+ {
+ caseDesc: "make sure the route is not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ },
+ {
+ caseDesc: "create route with invalid dag conf",
Review comment:
fixed.
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
+ assert.Nil(t, err)
+ invalidDagConf := string(bytes)
+
+ tests := []HttpTestCase{
+ {
+ caseDesc: "make sure the route is not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ },
+ {
+ caseDesc: "create route with invalid dag conf",
+ Object: MangerApiExpect(t),
+ Method: http.MethodPut,
+ Path: "/apisix/admin/routes/r1",
+ Body: invalidDagConf,
+ Headers: map[string]string{"Authorization": token},
+ ExpectStatus: http.StatusBadRequest,
+ },
+ {
+ caseDesc: "make sure the route created failed",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/hello",
+ ExpectStatus: http.StatusNotFound,
+ ExpectBody: `{"error_msg":"404 Route Not Found"}`,
+ Sleep: sleepTime,
+ },
+ {
+ caseDesc: "create route with correct dag cof",
Review comment:
fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (df6cc01) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **decrease** coverage by `0.29%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
==========================================
- Coverage 43.03% 42.74% -0.30%
==========================================
Files 18 18
Lines 1271 1289 +18
==========================================
+ Hits 547 551 +4
- Misses 632 646 +14
Partials 92 92
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `51.61% <0.00%> (-7.65%)` | :arrow_down: |
| [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.65% <0.00%> (-0.61%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `78.57% <0.00%> (-0.38%)` | :arrow_down: |
| [api/internal/core/entity/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L3F1ZXJ5Lmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (ø)` | |
| [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `34.92% <0.00%> (ø)` | |
| [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `46.56% <0.00%> (+0.11%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...df6cc01](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (2105a5f) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **decrease** coverage by `0.07%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
==========================================
- Coverage 43.03% 42.95% -0.08%
==========================================
Files 18 18
Lines 1271 1271
==========================================
- Hits 547 546 -1
- Misses 632 633 +1
Partials 92 92
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `78.28% <0.00%> (-0.66%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...9dfdfcc](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (9dfdfcc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
=======================================
Coverage 43.03% 43.03%
=======================================
Files 18 18
Lines 1271 1271
=======================================
Hits 547 547
Misses 632 632
Partials 92 92
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...9dfdfcc](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532469866
##########
File path: api/test/e2e/route_with_plugin_orchestration_test.go
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+ "io/ioutil"
+ "net/http"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestRoute_With_Plugin_Orchestration(t *testing.T) {
+ bytes, err := ioutil.ReadFile("../testdata/dag-conf.json")
+ assert.Nil(t, err)
+ dagConf := string(bytes)
+ bytes, err = ioutil.ReadFile("../testdata/invalid-dag-conf.json")
Review comment:
added a comment.
----------------------------------------------------------------
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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532512146
##########
File path: api/test/testdata/dag-conf.json
##########
@@ -0,0 +1,331 @@
+{
+ "name": "route-with-plugin-orchestration",
+ "uri": "/hello*",
+ "upstream": {
+ "type": "roundrobin",
+ "nodes": [{
+ "host": "172.16.238.20",
+ "port": 1980,
+ "weight": 1
+ }]
+ },
+ "script":{
+ "rule":{
+ "root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+ "451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
+ [
+ "code == 403",
+ "b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
+ ],
+ [
+ "",
+ "988ef5c2-c896-4606-a666-3d4cbe24a731"
+ ]
+ ]
+ },
+ "conf":{
+ "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+ "name":"uri-blocker",
+ "conf":{
+ "block_rules":[
+ "root.exe",
+ "root.m+"
+ ],
+ "rejected_code":403
+ }
+ },
+ "988ef5c2-c896-4606-a666-3d4cbe24a731":{
+ "name":"kafka-logger",
+ "conf":{
+ "batch_max_size":1000,
+ "broker_list":{
+
+ },
+ "buffer_duration":60,
+ "inactive_timeout":5,
+ "include_req_body":false,
+ "kafka_topic":"1",
+ "key":"2",
+ "max_retry_count":0,
+ "name":"kafka logger",
+ "retry_delay":1,
+ "timeout":3
+ }
+ },
+ "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+ "name":"fault-injection",
+ "conf":{
+ "abort":{
+ "body":"blocked",
+ "http_status":403
+ },
+ "delay":{
+ "duration":2
+ }
+ }
+ }
+ },
+ "chart":{
+ "hovered":{
+
+ },
+ "links":{
+ "3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
+ "from":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port3"
+ },
+ "id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
+ "to":{
+ "nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+ "portId":"port1"
+ }
+ },
+ "c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
+ "from":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port2"
+ },
+ "id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
+ "to":{
+ "nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+ "portId":"port1"
+ }
+ },
+ "f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
+ "from":{
+ "nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+ "portId":"port2"
+ },
+ "id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
+ "to":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port1"
+ }
+ }
+ },
+ "nodes":{
+ "3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
+ "id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "orientation":0,
+ "ports":{
+ "port1":{
+ "id":"port1",
+ "position":{
+ "x":107,
+ "y":0
+ },
+ "type":"input"
+ },
+ "port2":{
+ "id":"port2",
+ "position":{
+ "x":92,
+ "y":96
+ },
+ "properties":{
+ "value":"no"
+ },
+ "type":"output"
+ },
+ "port3":{
+ "id":"port3",
+ "position":{
+ "x":122,
+ "y":96
+ },
+ "properties":{
+ "value":"yes"
+ },
+ "type":"output"
+ }
+ },
+ "position":{
+ "x":750.2627969928922,
+ "y":301.0370335799397
+ },
+ "properties":{
+ "customData":{
+ "name":"code == 403",
+ "type":1
+ }
+ },
+ "size":{
+ "height":96,
+ "width":214
+ },
+ "type":"判断条件"
Review comment:
fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io commented on pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (3908acc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
=======================================
Coverage 43.03% 43.03%
=======================================
Files 18 18
Lines 1271 1271
=======================================
Hits 547 547
Misses 632 632
Partials 92 92
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...3908acc](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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] gxthrj merged pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
gxthrj merged pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] membphis commented on a change in pull request #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#discussion_r532507597
##########
File path: api/test/testdata/dag-conf.json
##########
@@ -0,0 +1,331 @@
+{
+ "name": "route-with-plugin-orchestration",
+ "uri": "/hello*",
+ "upstream": {
+ "type": "roundrobin",
+ "nodes": [{
+ "host": "172.16.238.20",
+ "port": 1980,
+ "weight": 1
+ }]
+ },
+ "script":{
+ "rule":{
+ "root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+ "451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
+ [
+ "code == 403",
+ "b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
+ ],
+ [
+ "",
+ "988ef5c2-c896-4606-a666-3d4cbe24a731"
+ ]
+ ]
+ },
+ "conf":{
+ "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+ "name":"uri-blocker",
+ "conf":{
+ "block_rules":[
+ "root.exe",
+ "root.m+"
+ ],
+ "rejected_code":403
+ }
+ },
+ "988ef5c2-c896-4606-a666-3d4cbe24a731":{
+ "name":"kafka-logger",
+ "conf":{
+ "batch_max_size":1000,
+ "broker_list":{
+
+ },
+ "buffer_duration":60,
+ "inactive_timeout":5,
+ "include_req_body":false,
+ "kafka_topic":"1",
+ "key":"2",
+ "max_retry_count":0,
+ "name":"kafka logger",
+ "retry_delay":1,
+ "timeout":3
+ }
+ },
+ "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+ "name":"fault-injection",
+ "conf":{
+ "abort":{
+ "body":"blocked",
+ "http_status":403
+ },
+ "delay":{
+ "duration":2
+ }
+ }
+ }
+ },
+ "chart":{
+ "hovered":{
+
+ },
+ "links":{
+ "3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
+ "from":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port3"
+ },
+ "id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
+ "to":{
+ "nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+ "portId":"port1"
+ }
+ },
+ "c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
+ "from":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port2"
+ },
+ "id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
+ "to":{
+ "nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+ "portId":"port1"
+ }
+ },
+ "f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
+ "from":{
+ "nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+ "portId":"port2"
+ },
+ "id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
+ "to":{
+ "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "portId":"port1"
+ }
+ }
+ },
+ "nodes":{
+ "3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
+ "id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+ "orientation":0,
+ "ports":{
+ "port1":{
+ "id":"port1",
+ "position":{
+ "x":107,
+ "y":0
+ },
+ "type":"input"
+ },
+ "port2":{
+ "id":"port2",
+ "position":{
+ "x":92,
+ "y":96
+ },
+ "properties":{
+ "value":"no"
+ },
+ "type":"output"
+ },
+ "port3":{
+ "id":"port3",
+ "position":{
+ "x":122,
+ "y":96
+ },
+ "properties":{
+ "value":"yes"
+ },
+ "type":"output"
+ }
+ },
+ "position":{
+ "x":750.2627969928922,
+ "y":301.0370335799397
+ },
+ "properties":{
+ "customData":{
+ "name":"code == 403",
+ "type":1
+ }
+ },
+ "size":{
+ "height":96,
+ "width":214
+ },
+ "type":"判断条件"
Review comment:
Chinese?
----------------------------------------------------------------
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 #913: test: add e2e test for config route with plugin orchestration
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #913:
URL: https://github.com/apache/apisix-dashboard/pull/913#issuecomment-735591987
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=h1) Report
> Merging [#913](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=desc) (31a452e) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/038c078eb5fb9b39642ff47d0456538a652ae614?el=desc) (038c078) will **decrease** coverage by `0.21%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #913 +/- ##
==========================================
- Coverage 43.03% 42.82% -0.22%
==========================================
Files 18 18
Lines 1271 1289 +18
==========================================
+ Hits 547 552 +5
- Misses 632 645 +13
Partials 92 92
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/913?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv) | `51.61% <0.00%> (-7.65%)` | :arrow_down: |
| [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.65% <0.00%> (-0.61%)` | :arrow_down: |
| [api/internal/core/entity/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L3F1ZXJ5Lmdv) | `0.00% <0.00%> (ø)` | |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (ø)` | |
| [api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=) | `34.92% <0.00%> (ø)` | |
| [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `46.56% <0.00%> (+0.11%)` | :arrow_up: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/913/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.22% <0.00%> (+0.27%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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/913?src=pr&el=footer). Last update [038c078...31a452e](https://codecov.io/gh/apache/apisix-dashboard/pull/913?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