Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
adrianchiris committed May 22, 2023
1 parent 8f6cbf4 commit 33218b1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inpackage: False
testonly: False
with-expecter: True
keeptree: True
keeptree: True
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ $(GCOV2LCOV): | $(LOCALBIN)
GOBIN=$(LOCALBIN) go install github.com/jandelgado/gcov2lcov@$(GCOV2LCOV_VERSION)

.PHONY: mockery
mockery: $(MOCKERY) ## Download gcov2lcov locally if necessary.
mockery: $(MOCKERY) ## Download mockery locally if necessary.
$(MOCKERY): | $(LOCALBIN)
GOBIN=$(LOCALBIN) go install github.com/vektra/mockery/v2@$(MOCKERY_VERSION)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/onsi/gomega v1.24.2
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.3
k8s.io/api v0.26.4
k8s.io/apimachinery v0.26.4
k8s.io/client-go v0.26.4
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
Expand Down
9 changes: 1 addition & 8 deletions pkg/cmdutils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ var _ = Describe("cmdutils testing", func() {
)

BeforeEach(func() {
var err error
tmpDir, err = os.MkdirTemp("", "nv_ipam_thin_entrypoint_tmp")
Expect(err).NotTo(HaveOccurred())
})

AfterEach(func() {
err := os.RemoveAll(tmpDir)
Expect(err).NotTo(HaveOccurred())
tmpDir = GinkgoT().TempDir()
})

It("Run CopyFileAtomic()", func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var _ = Describe("pool tests", func() {
Expect(err).To(HaveOccurred())
})

It("Fails to create Manager if node has empty ip-pool annotation", func() {
It("Fails to create Manager if node has empty/invalid ip-pool annotation", func() {
n := v1.Node{}
emptyAnnot := map[string]string{
pool.IPBlocksAnnotation: "",
Expand Down

0 comments on commit 33218b1

Please sign in to comment.