forked from openservicemesh/osm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smi/test: add test coverage for pkg/smi
The SMI client has a lot of code but no tests. `github.com/openservicemesh/osm/pkg/smi coverage: 0.0% of statements` This change uses fake kubernetes clients to test all the functions that implement the MeshSpec interface. It also removes dead code. It helps improve the code coverage from 0.0% to 74.6%. `github.com/openservicemesh/osm/pkg/smi coverage: 74.6% of statements`. Due to some limitations of fake kubernetes clients such as not being able to enforce label selector semantics with client informers and caches, a few code paths repeated in each function are not testable. Part of openservicemesh#1489 Signed-off-by: Shashank Ram <shashank08@gmail.com>
- Loading branch information
1 parent
a75bdfe
commit 10b958f
Showing
6 changed files
with
621 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.