Skip to content

Commit bb9442a

Browse files
feat: migrate from golang gomock to uber gomock (runfinch#264)
Signed-off-by: shubhranshu153 <[email protected]>
1 parent 4dcccfc commit bb9442a

File tree

125 files changed

+975
-797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+975
-797
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ endif
7777
.PHONY: gen-code
7878
gen-code: linux
7979
rm -rf ./pkg/mocks
80-
GOBIN=$(BIN) go install github.com/golang/mock/mockgen@v1.6.0
80+
GOBIN=$(BIN) go install go.uber.org/mock/mockgen@v0.5.2
8181
GOBIN=$(BIN) go install golang.org/x/tools/cmd/[email protected]
8282
PATH=$(BIN):$(PATH) go generate ./...
8383
PATH=$(BIN):$(PATH) mockgen --destination=./mocks/mocks_container/container.go -package=mocks_container github.com/containerd/containerd/v2/client Container

api/handlers/builder/build_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"net/http/httptest"
1313

1414
"github.com/containerd/nerdctl/v2/pkg/config"
15-
"github.com/golang/mock/gomock"
15+
"go.uber.org/mock/gomock"
1616
. "github.com/onsi/ginkgo/v2"
1717
. "github.com/onsi/gomega"
1818

api/handlers/builder/builder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111

1212
"github.com/containerd/nerdctl/v2/pkg/config"
13-
"github.com/golang/mock/gomock"
13+
"go.uber.org/mock/gomock"
1414
"github.com/gorilla/mux"
1515
. "github.com/onsi/ginkgo/v2"
1616
. "github.com/onsi/gomega"

api/handlers/container/attach_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/runfinch/finch-daemon/api/types"
2222

2323
"github.com/containerd/nerdctl/v2/pkg/config"
24-
"github.com/golang/mock/gomock"
24+
"go.uber.org/mock/gomock"
2525
. "github.com/onsi/ginkgo/v2"
2626
. "github.com/onsi/gomega"
2727
"github.com/pkg/errors"

api/handlers/container/container_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"testing"
1212

1313
"github.com/containerd/nerdctl/v2/pkg/config"
14-
"github.com/golang/mock/gomock"
14+
"go.uber.org/mock/gomock"
1515
"github.com/gorilla/mux"
1616
. "github.com/onsi/ginkgo/v2"
1717
. "github.com/onsi/gomega"

api/handlers/container/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/containerd/nerdctl/v2/pkg/config"
1818
"github.com/containerd/nerdctl/v2/pkg/defaults"
1919
"github.com/docker/go-connections/nat"
20-
"github.com/golang/mock/gomock"
20+
"go.uber.org/mock/gomock"
2121
. "github.com/onsi/ginkgo/v2"
2222
. "github.com/onsi/gomega"
2323

api/handlers/container/exec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"net/http/httptest"
1212

1313
"github.com/containerd/nerdctl/v2/pkg/config"
14-
"github.com/golang/mock/gomock"
14+
"go.uber.org/mock/gomock"
1515
"github.com/gorilla/mux"
1616
. "github.com/onsi/ginkgo/v2"
1717
. "github.com/onsi/gomega"

api/handlers/container/get_archive_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"net/http/httptest"
1010

1111
"github.com/containerd/nerdctl/v2/pkg/config"
12-
"github.com/golang/mock/gomock"
12+
"go.uber.org/mock/gomock"
1313
"github.com/gorilla/mux"
1414
. "github.com/onsi/ginkgo/v2"
1515
. "github.com/onsi/gomega"

api/handlers/container/inspect_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"net/http/httptest"
1111

1212
"github.com/containerd/nerdctl/v2/pkg/config"
13-
"github.com/golang/mock/gomock"
13+
"go.uber.org/mock/gomock"
1414
"github.com/gorilla/mux"
1515
. "github.com/onsi/ginkgo/v2"
1616
. "github.com/onsi/gomega"

api/handlers/container/kill_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
ncTypes "github.com/containerd/nerdctl/v2/pkg/api/types"
1313
"github.com/containerd/nerdctl/v2/pkg/config"
14-
"github.com/golang/mock/gomock"
14+
"go.uber.org/mock/gomock"
1515
"github.com/gorilla/mux"
1616
. "github.com/onsi/ginkgo/v2"
1717
. "github.com/onsi/gomega"

0 commit comments

Comments
 (0)