Skip to content

Commit 3a58c65

Browse files
Replace github.com/golang/mock with go.uber.org/mock
1 parent cf383b5 commit 3a58c65

25 files changed

+87
-64
lines changed

apiserver/authwrapper/authorizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"k8s.io/apiserver/pkg/endpoints/filters"
1313
)
1414

15-
//go:generate go run github.com/golang/mock/mockgen -destination=./mock/$GOFILE -package mock k8s.io/apiserver/pkg/authorization/authorizer Authorizer
15+
//go:generate go run go.uber.org/mock/mockgen -destination=./mock/$GOFILE -package mock k8s.io/apiserver/pkg/authorization/authorizer Authorizer
1616

1717
// Authorizer processes authorization requests for `{rbacID.Resource}` and checks them based on rbac rules for `{rbacID}`
1818
type Authorizer struct {

apiserver/authwrapper/mock/authorizer.go

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apiserver/authwrapper/mock/storage.go

Lines changed: 16 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apiserver/authwrapper/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"k8s.io/apiserver/pkg/registry/rest"
1818
)
1919

20-
//go:generate go run github.com/golang/mock/mockgen -destination=./mock/$GOFILE -package mock k8s.io/apiserver/pkg/registry/rest StandardStorage,Storage,Responder
20+
//go:generate go run go.uber.org/mock/mockgen -destination=./mock/$GOFILE -package mock k8s.io/apiserver/pkg/registry/rest StandardStorage,Storage,Responder
2121

2222
var _ StandardStorage = &authorizedStorageWithLister{}
2323

apiserver/authwrapper/storage_test.go

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

12-
"github.com/golang/mock/gomock"
1312
"github.com/stretchr/testify/assert"
1413
"github.com/stretchr/testify/require"
14+
"go.uber.org/mock/gomock"
1515
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1616
"k8s.io/apimachinery/pkg/runtime"
1717
"k8s.io/apimachinery/pkg/watch"

apiserver/billing/odoostorage/odoo/odoo8/client/clientmock/session.go

Lines changed: 15 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apiserver/billing/odoostorage/odoo/odoo8/client/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var (
1313
ErrInvalidCredentials = errors.New("invalid credentials")
1414
)
1515

16-
//go:generate go run github.com/golang/mock/mockgen -destination=./clientmock/$GOFILE -package clientmock . QueryExecutor
16+
//go:generate go run go.uber.org/mock/mockgen -destination=./clientmock/$GOFILE -package clientmock . QueryExecutor
1717

1818
// QueryExecutor runs queries against Odoo API.
1919
type QueryExecutor interface {

apiserver/billing/odoostorage/odoo/odoo8/odoo8_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/golang/mock/gomock"
98
"github.com/stretchr/testify/assert"
109
"github.com/stretchr/testify/require"
10+
"go.uber.org/mock/gomock"
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1212

1313
billingv1 "github.com/appuio/control-api/apis/billing/v1"

apiserver/billing/rbac_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/golang/mock/gomock"
87
"github.com/stretchr/testify/assert"
98
"github.com/stretchr/testify/require"
9+
"go.uber.org/mock/gomock"
1010
rbacv1 "k8s.io/api/rbac/v1"
1111
apierrors "k8s.io/apimachinery/pkg/api/errors"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

apiserver/organization/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"fmt"
77
"testing"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/stretchr/testify/assert"
1110
"github.com/stretchr/testify/require"
11+
"go.uber.org/mock/gomock"
1212

1313
orgv1 "github.com/appuio/control-api/apis/organization/v1"
1414
controlv1 "github.com/appuio/control-api/apis/v1"

0 commit comments

Comments
 (0)