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

UT: Increase unit test coverage of pkg/bootstrap #101

Merged
merged 6 commits into from
Jan 14, 2023

Conversation

Charlie17Li
Copy link
Collaborator

@Charlie17Li Charlie17Li commented Dec 7, 2022

Signed-off-by: charlie qianglin98@qq.com

Ⅰ. Describe what this PR did

unit Test: Increase unit test coverage of pkg/bootstrap

Ⅱ. Does this pull request fix one issue?

fixes #83

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

➜  bootstrap git:(UT/bootstrap) go test -coverprofile=size_coverage.out
2022-12-07T05:57:50.295408Z     info    init xds server
2022-12-07T05:57:50.295636Z     info    ingress Skipping IngressClass, resource not supported for cluster 
2022-12-07T05:57:50.295660Z     info    ingress Disable status update for cluster 
2022-12-07T05:57:50.295704Z     info    initializing registry event handlers
2022-12-07T05:57:50.295711Z     info    ingress register resource networking.istio.io/v1alpha3/DestinationRule
2022-12-07T05:57:50.295718Z     info    ingress register resource networking.istio.io/v1alpha3/EnvoyFilter
2022-12-07T05:57:50.295721Z     info    ingress register resource networking.istio.io/v1alpha3/Gateway
2022-12-07T05:57:50.295724Z     info    ingress register resource networking.istio.io/v1alpha3/VirtualService
2022-12-07T05:57:50.295730Z     info    Starting ADS server
2022-12-07T05:57:50.296284Z     info    Waiting for caches to be synced
2022-12-07T05:57:50.296305Z     info    ingress Ingress config controller synced.
2022-12-07T05:57:50.296313Z     info    All controller caches have been synced up in 27.605µs
2022-12-07T05:57:50.296335Z     info    ads     All caches have been synced up in 1.768974ms, marking server ready
PASS
2022-12-07T05:57:50.296615Z     info    starting gRPC discovery service at [::]:15051
2022-12-07T05:57:50.296664Z     error   ingress Failed to sync ingress controller cache for cluster 
2022-12-07T05:57:50.296679Z     info    starting HTTP service at [::]:8888
2022-12-07T05:57:50.296674Z     error   ingress Failed to sync secret controller cache
coverage: 71.0% of statements
ok      github.com/alibaba/higress/pkg/bootstrap        1.094s

@CLAassistant
Copy link

CLAassistant commented Dec 7, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@SpecialYang SpecialYang left a comment

Choose a reason for hiding this comment

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

Can you add License for the new added unit test file.

@codecov-commenter
Copy link

Codecov Report

Merging #101 (a3f7d3c) into main (4776d62) will increase coverage by 1.99%.
The diff coverage is 40.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   25.02%   27.02%   +1.99%     
==========================================
  Files          24       25       +1     
  Lines        4076     4326     +250     
==========================================
+ Hits         1020     1169     +149     
- Misses       2999     3081      +82     
- Partials       57       76      +19     
Impacted Files Coverage Δ
pkg/bootstrap/server.go 59.60% <40.00%> (ø)

@johnlanni
Copy link
Collaborator

@Charlie17Li There are some conflicts that need to be resolved.

Signed-off-by: charlie <qianglin98@qq.com>
Signed-off-by: charlie <qianglin98@qq.com>
Signed-off-by: charlie <qianglin98@qq.com>
Signed-off-by: charlie <qianglin98@qq.com>
@Charlie17Li
Copy link
Collaborator Author

Can you add License for the new added unit test file.

ok

@Charlie17Li
Copy link
Collaborator Author

@Charlie17Li There are some conflicts that need to be resolved.

ok

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.

pkg/bootstrap 提升单测覆盖率 (Increase unit test coverage)
5 participants