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

Add unit test #21

Merged
merged 9 commits into from
May 23, 2023
Merged

Add unit test #21

merged 9 commits into from
May 23, 2023

Conversation

adrianchiris
Copy link
Collaborator

No description provided.

Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: adrianc <adrianc@nvidia.com>
- use mockery to generate mocks: add makefile targets
- refactor types and plugin, use interfaces for
  parsing config file and executing IPAM plugin as
  prep work for unit tests
- generate mocks

Signed-off-by: adrianc <adrianc@nvidia.com>
Signed-off-by: adrianc <adrianc@nvidia.com>
@coveralls
Copy link

Coverage Status

Coverage: 70.861% (-5.1%) from 76.01% when pulling 3ff5af7 on adrianchiris:add-unit-test into 6f7d60a on Mellanox:main.

@adrianchiris
Copy link
Collaborator Author

coverage results are inaccurate, need to exclude mocks from cov results

- generate list of packages to test
- run test only on those packages
- remove -coverpkg flag

Signed-off-by: adrianc <adrianc@nvidia.com>
pkg/cni/k8sclient/k8sclient_test.go Show resolved Hide resolved
pkg/pool/pool.go Show resolved Hide resolved
pkg/pool/pool_test.go Outdated Show resolved Hide resolved
.mockery.yaml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
pkg/cmdutils/utils_test.go Outdated Show resolved Hide resolved
- newline in .mockery.yaml file
- fix typo in Makefile
- update test description pool test
- use Ginkgo TempDir() in cmdtutils test
- bump testify version to v1.8.3

Signed-off-by: adrianc <adrianc@nvidia.com>
@moshe010 moshe010 merged commit bb3cdff into Mellanox:main May 23, 2023
8 checks passed
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.

None yet

4 participants