Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support plugin config #1509

Merged
merged 19 commits into from
Mar 3, 2021
Merged

Conversation

nic-chen
Copy link
Member

Please answer these questions before submitting a pull request

  • Why submit this pull request?
  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

support plugin config in Manager API
related pr in APISIX apache/apisix#3567

@codecov-io
Copy link

codecov-io commented Mar 1, 2021

Codecov Report

Merging #1509 (6a13c92) into master (2dbd204) will decrease coverage by 8.02%.
The diff coverage is 62.60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1509      +/-   ##
==========================================
- Coverage   70.12%   62.09%   -8.03%     
==========================================
  Files         129      130       +1     
  Lines        5231     5340     +109     
  Branches      549      549              
==========================================
- Hits         3668     3316     -352     
- Misses       1323     1723     +400     
- Partials      240      301      +61     
Flag Coverage Δ
backend-e2e-test 55.46% <62.60%> (-0.15%) ⬇️
backend-e2e-test-ginkgo 38.27% <58.26%> (+4.69%) ⬆️
backend-unit-test ?
frontend-e2e-test 71.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/core/entity/entity.go 100.00% <ø> (ø)
...pi/internal/handler/plugin_config/plugin_config.go 56.38% <56.38%> (ø)
api/internal/core/store/storehub.go 71.02% <77.77%> (-3.47%) ⬇️
api/internal/handler/label/label.go 80.18% <100.00%> (-1.00%) ⬇️
api/internal/route.go 85.71% <100.00%> (+0.42%) ⬆️
api/internal/core/store/query.go 0.00% <0.00%> (-88.10%) ⬇️
api/internal/core/store/selector.go 0.00% <0.00%> (-75.93%) ⬇️
api/internal/handler/plugin/plugin.go 15.15% <0.00%> (-72.73%) ⬇️
api/internal/utils/runtime/runtime.go 0.00% <0.00%> (-64.29%) ⬇️
api/internal/core/store/validate_mock.go 0.00% <0.00%> (-50.00%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dbd204...6a13c92. Read the comment docs.

Headers: map[string]string{"Authorization": base.GetToken()},
ExpectStatus: http.StatusOK,
}),
table.Entry("create plugin config", base.HttpTestCase{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems create plugin config => get plugin config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

}),
table.Entry("create plugin config", base.HttpTestCase{
Object: base.ManagerApiExpect(),
Path: "/apisix/admin/plugin_configs/1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to test list function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@gxthrj
Copy link
Contributor

gxthrj commented Mar 2, 2021

E2E test failed

@@ -302,6 +333,14 @@ func TestLabel(t *testing.T) {
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusOK,
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can plugin_config be updated? If so, we should also add update test suites.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@nic-chen nic-chen merged commit 2de2c72 into apache:master Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants