Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

tests: Update tests to use Go Testing #4057

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

snehachhabria
Copy link
Contributor

Description:

Update the existing tests to use go testing and improve coverage to 80%

Part of #1704 and #1489

Signed-off-by: Sneha Chhabria snchh@microsoft.com

Testing done:
Unit tests updated

Affected area:

Functional Area
New Functionality [ ]
CI System [ ]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [ ]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [X]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? `no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2021

Codecov Report

Merging #4057 (0ea4311) into main (73079be) will increase coverage by 0.59%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4057      +/-   ##
==========================================
+ Coverage   67.83%   68.43%   +0.59%     
==========================================
  Files         205      205              
  Lines       11629    11616      -13     
==========================================
+ Hits         7889     7949      +60     
+ Misses       3689     3617      -72     
+ Partials       51       50       -1     
Flag Coverage Δ
unittests 68.43% <100.00%> (+0.59%) ⬆️

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

Impacted Files Coverage Δ
pkg/catalog/debugger.go 100.00% <ø> (+9.09%) ⬆️
pkg/debugger/mock_debugger_generated.go 77.77% <ø> (+11.74%) ⬆️
pkg/service/types.go 100.00% <ø> (+25.00%) ⬆️
pkg/envoy/ads/secrets.go 88.46% <100.00%> (ø)
pkg/envoy/xdsutil.go 88.67% <100.00%> (ø)
pkg/k8s/client.go 92.61% <100.00%> (ø)
pkg/injector/envoy_config_health_probes.go 94.09% <0.00%> (+2.53%) ⬆️
pkg/injector/envoy_config.go 83.13% <0.00%> (+3.61%) ⬆️
pkg/injector/patch.go 90.76% <0.00%> (+4.61%) ⬆️
pkg/crdconversion/crdconversion.go 75.00% <0.00%> (+5.43%) ⬆️
... and 4 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 73079be...0ea4311. Read the comment docs.

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

Left one suggestion and one comment, neither should block this.

cmd/osm-controller/validate_test.go Show resolved Hide resolved
pkg/k8s/event_handlers_test.go Show resolved Hide resolved
Update the existing tests to use go testing framework  and improve coverage to 80%

Part of openservicemesh#1704 and # 1489

Signed-off-by: Sneha Chhabria <snchh@microsoft.com>
@snehachhabria snehachhabria merged commit 5ee1940 into openservicemesh:main Aug 31, 2021
@snehachhabria snehachhabria deleted the updateTests branch September 24, 2021 19:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants