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

feature: [refactor]add code coverage for api #545

Closed
2 of 5 tasks
nic-chen opened this issue Oct 9, 2020 · 4 comments
Closed
2 of 5 tasks

feature: [refactor]add code coverage for api #545

nic-chen opened this issue Oct 9, 2020 · 4 comments
Assignees
Milestone

Comments

@nic-chen
Copy link
Member

nic-chen commented Oct 9, 2020

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirements
  • Feature or performance improvement
  • Other

Requirement or improvement

Add code coverage for api
And improve code coverage

@nic-chen nic-chen changed the title feature: add code coverage for api feature: [refactor]add code coverage for api Oct 9, 2020
@juzhiyuan juzhiyuan added this to the 1.6 milestone Oct 20, 2020
@juzhiyuan
Copy link
Member

Should this issue be resolved in or after 2.0?

@moonming
Copy link
Member

moonming commented Oct 22, 2020

yes, can be put after 2.0.
But what is the coverage of the code now? @nic-chen

@nic-chen
Copy link
Member Author

@moonming
here is the result currently:

?   	github.com/apisix/manager-api	[no test files]
?   	github.com/apisix/manager-api/conf	[no test files]
?   	github.com/apisix/manager-api/filter	[no test files]
?   	github.com/apisix/manager-api/internal	[no test files]
ok  	github.com/apisix/manager-api/internal/core/entity	0.970s	coverage: 19.7% of statements
?   	github.com/apisix/manager-api/internal/core/storage	[no test files]
ok  	github.com/apisix/manager-api/internal/core/store	2.216s	coverage: 72.2% of statements
?   	github.com/apisix/manager-api/internal/handler	[no test files]
ok  	github.com/apisix/manager-api/internal/handler/authentication	1.161s	coverage: 83.3% of statements
ok  	github.com/apisix/manager-api/internal/handler/consumer	2.429s	coverage: 62.8% of statements
?   	github.com/apisix/manager-api/internal/handler/healthz	[no test files]
ok  	github.com/apisix/manager-api/internal/handler/plugin	0.907s	coverage: 75.0% of statements
ok  	github.com/apisix/manager-api/internal/handler/route	2.918s	coverage: 60.0% of statements
ok  	github.com/apisix/manager-api/internal/handler/service	2.944s	coverage: 40.3% of statements
ok  	github.com/apisix/manager-api/internal/handler/ssl	1.899s	coverage: 40.5% of statements
ok  	github.com/apisix/manager-api/internal/handler/upstream	1.561s	coverage: 28.3% of statements
ok  	github.com/apisix/manager-api/internal/utils	0.708s	coverage: 63.3% of statements

@nic-chen
Copy link
Member Author

nic-chen commented Dec 4, 2020

We have collected code coverage for unit test.

But can't find a way to collect coverage for e2e test.

I created an issue to continue tracking to see if I can find a solution. #966

close this first.

@nic-chen nic-chen closed this as completed Dec 4, 2020
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

No branches or pull requests

3 participants