Skip to content

Commit e8973c7

Browse files
committed
Replace golang/mock with go.uber.org/mock
1 parent d48c798 commit e8973c7

File tree

18 files changed

+18
-20
lines changed

18 files changed

+18
-20
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ require (
1717
github.com/davecgh/go-spew v1.1.1
1818
github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6
1919
github.com/go-test/deep v1.0.3
20-
github.com/golang/mock v1.6.0
2120
github.com/google/go-cmp v0.6.0
2221
github.com/google/uuid v1.3.1
2322
github.com/hashicorp/cli v1.1.6
@@ -70,6 +69,7 @@ require (
7069
go.opentelemetry.io/otel v1.24.0
7170
go.opentelemetry.io/otel/sdk v1.24.0
7271
go.opentelemetry.io/otel/trace v1.24.0
72+
go.uber.org/mock v0.4.0
7373
golang.org/x/crypto v0.21.0
7474
golang.org/x/mod v0.16.0
7575
golang.org/x/net v0.23.0
@@ -251,7 +251,6 @@ require (
251251
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect
252252
go.opentelemetry.io/otel/metric v1.24.0 // indirect
253253
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
254-
go.uber.org/mock v0.4.0 // indirect
255254
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
256255
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
257256
golang.org/x/sync v0.7.0 // indirect

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
517517
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
518518
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
519519
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
520-
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
521520
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
522521
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
523522
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=

internal/backend/remote-state/http/mock_server_test.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/backend/remote-state/http/server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
package http
55

6-
//go:generate go run github.com/golang/mock/mockgen -package $GOPACKAGE -source $GOFILE -destination mock_$GOFILE
6+
//go:generate go run go.uber.org/mock/mockgen -package $GOPACKAGE -source $GOFILE -destination mock_$GOFILE
77

88
import (
99
"context"
@@ -22,12 +22,12 @@ import (
2222
"syscall"
2323
"testing"
2424

25-
"github.com/golang/mock/gomock"
2625
"github.com/hashicorp/terraform/internal/addrs"
2726
"github.com/hashicorp/terraform/internal/backend"
2827
"github.com/hashicorp/terraform/internal/configs"
2928
"github.com/hashicorp/terraform/internal/states"
3029
"github.com/zclconf/go-cty/cty"
30+
"go.uber.org/mock/gomock"
3131
)
3232

3333
const sampleState = `

internal/cloud/backend_apply_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
"testing"
1414
"time"
1515

16-
gomock "github.com/golang/mock/gomock"
1716
"github.com/google/go-cmp/cmp"
1817
"github.com/hashicorp/cli"
1918
tfe "github.com/hashicorp/go-tfe"
2019
mocks "github.com/hashicorp/go-tfe/mocks"
2120
version "github.com/hashicorp/go-version"
21+
gomock "go.uber.org/mock/gomock"
2222

2323
"github.com/hashicorp/terraform/internal/addrs"
2424
"github.com/hashicorp/terraform/internal/backend/backendrun"

internal/cloud/backend_run_warning_test.go

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

12-
"github.com/golang/mock/gomock"
1312
"github.com/hashicorp/cli"
1413
"github.com/hashicorp/go-tfe"
1514
tfemocks "github.com/hashicorp/go-tfe/mocks"
15+
"go.uber.org/mock/gomock"
1616
)
1717

1818
func MockAllRunEvents(t *testing.T, client *tfe.Client) (fullRunID string, emptyRunID string) {

internal/cloud/backend_taskStages_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/hashicorp/go-tfe"
1413
tfemocks "github.com/hashicorp/go-tfe/mocks"
14+
"go.uber.org/mock/gomock"
1515
)
1616

1717
func MockAllTaskStages(t *testing.T, client *tfe.Client) (RunID string) {

internal/cloudplugin/cloudplugin1/grpc_client_test.go

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

14-
"github.com/golang/mock/gomock"
1514
"github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1"
1615
"github.com/hashicorp/terraform/internal/cloudplugin/mock_cloudproto1"
16+
"go.uber.org/mock/gomock"
1717
)
1818

1919
var mockError = "this is a mock error"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: BUSL-1.1
33

4-
//go:generate go run github.com/golang/mock/mockgen -destination mock.go github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1 CommandServiceClient,CommandService_ExecuteClient
4+
//go:generate go run go.uber.org/mock/mockgen -destination mock.go github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1 CommandServiceClient,CommandService_ExecuteClient
55

66
package mock_cloudproto1

internal/cloudplugin/mock_cloudproto1/mock.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)