Skip to content

Commit 14568b2

Browse files
committed
Merge 3.2 into 3.3 (including gomock changes)
2 parents d0896cd + 8e630b3 commit 14568b2

File tree

1,000 files changed

+1367
-1351
lines changed

Some content is hidden

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

1,000 files changed

+1367
-1351
lines changed

agent/addons/addons_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"runtime"
88
"time"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/juju/clock"
1211
"github.com/juju/errors"
1312
"github.com/juju/loggo"
@@ -17,6 +16,7 @@ import (
1716
"github.com/juju/worker/v3"
1817
"github.com/juju/worker/v3/dependency"
1918
"github.com/prometheus/client_golang/prometheus"
19+
"go.uber.org/mock/gomock"
2020
gc "gopkg.in/check.v1"
2121

2222
"github.com/juju/juju/agent/addons"

agent/addons/engine_mock_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.

agent/addons/package_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
gc "gopkg.in/check.v1"
1010
)
1111

12-
//go:generate go run github.com/golang/mock/mockgen -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer
13-
//go:generate go run github.com/golang/mock/mockgen -package addons_test -destination engine_mock_test.go github.com/juju/juju/cmd/jujud/agent/engine MetricSink
12+
//go:generate go run go.uber.org/mock/mockgen -package addons_test -destination prometheus_mock_test.go github.com/prometheus/client_golang/prometheus Registerer
13+
//go:generate go run go.uber.org/mock/mockgen -package addons_test -destination engine_mock_test.go github.com/juju/juju/cmd/jujud/agent/engine MetricSink
1414

1515
func Test(t *testing.T) {
1616
gc.TestingT(t)

agent/addons/prometheus_mock_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.

api/agent/instancemutater/instancemutater_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ package instancemutater_test
66
import (
77
"time"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/juju/errors"
1110
"github.com/juju/names/v4"
1211
jc "github.com/juju/testing/checkers"
12+
"go.uber.org/mock/gomock"
1313
gc "gopkg.in/check.v1"
1414

1515
"github.com/juju/juju/api/agent/instancemutater"

api/agent/instancemutater/machine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ package instancemutater_test
66
import (
77
"time"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/juju/errors"
1110
"github.com/juju/names/v4"
1211
jc "github.com/juju/testing/checkers"
12+
"go.uber.org/mock/gomock"
1313
gc "gopkg.in/check.v1"
1414

1515
"github.com/juju/juju/api/agent/instancemutater"

api/agent/instancemutater/mocks/caller_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.

api/agent/instancemutater/mocks/machinemutater_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.

api/agent/instancemutater/package_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
gc "gopkg.in/check.v1"
1010
)
1111

12-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller
13-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine
12+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller
13+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machinemutater_mock.go github.com/juju/juju/api/agent/instancemutater MutaterMachine
1414

1515
func TestAll(t *testing.T) {
1616
gc.TestingT(t)

api/agent/provisioner/machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/juju/juju/rpc/params"
1919
)
2020

21-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner
21+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/machine_mock.go github.com/juju/juju/api/agent/provisioner MachineProvisioner
2222

2323
// MachineProvisioner defines what provisioner needs to provision a machine.
2424
type MachineProvisioner interface {

api/agent/provisioner/mocks/machine_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.

api/agent/provisioner/provisioner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"fmt"
88
"time"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/juju/errors"
1211
"github.com/juju/names/v4"
1312
jc "github.com/juju/testing/checkers"
1413
"github.com/juju/utils/v3"
14+
"go.uber.org/mock/gomock"
1515
gc "gopkg.in/check.v1"
1616

1717
"github.com/juju/juju/api"

api/agent/upgradeseries/upgradeseries_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
package upgradeseries_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
"github.com/juju/errors"
98
"github.com/juju/names/v4"
109
"github.com/juju/testing"
1110
jc "github.com/juju/testing/checkers"
11+
"go.uber.org/mock/gomock"
1212
gc "gopkg.in/check.v1"
1313

1414
"github.com/juju/juju/api/agent/upgradeseries"

api/agent/upgradesteps/upgradesteps_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
package upgradesteps_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
"github.com/juju/names/v4"
98
jc "github.com/juju/testing/checkers"
9+
"go.uber.org/mock/gomock"
1010
gc "gopkg.in/check.v1"
1111

1212
"github.com/juju/juju/api/agent/upgradesteps"

api/base/caller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"gopkg.in/macaroon.v2"
1616
)
1717

18-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller
18+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller
1919

2020
// APICaller is implemented by the client-facing State object.
2121
// It defines the lowest level of API calls and is used by

api/base/clientfacade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type APICallCloser interface {
1818
// BestAPIVersion() is used to allow for compatibility testing, and Close() is
1919
// used to indicate when we are done with the connection.
2020
//
21-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade
21+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/clientfacade_mock.go github.com/juju/juju/api/base APICallCloser,ClientFacade
2222
type ClientFacade interface {
2323
// BestAPIVersion returns the API version that we were able to
2424
// determine is supported by both the client and the API Server

api/base/mocks/caller_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.

api/base/mocks/clientfacade_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.

api/client/action/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
package action_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
"github.com/juju/errors"
98
"github.com/juju/names/v4"
109
jc "github.com/juju/testing/checkers"
10+
"go.uber.org/mock/gomock"
1111
gc "gopkg.in/check.v1"
1212

1313
basemocks "github.com/juju/juju/api/base/mocks"

api/client/action/pruner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package action_test
66
import (
77
"time"
88

9-
"github.com/golang/mock/gomock"
109
jc "github.com/juju/testing/checkers"
10+
"go.uber.org/mock/gomock"
1111
gc "gopkg.in/check.v1"
1212

1313
basemocks "github.com/juju/juju/api/base/mocks"

api/client/action/run_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package action_test
66
import (
77
"time"
88

9-
"github.com/golang/mock/gomock"
109
jc "github.com/juju/testing/checkers"
10+
"go.uber.org/mock/gomock"
1111
gc "gopkg.in/check.v1"
1212

1313
basemocks "github.com/juju/juju/api/base/mocks"

api/client/annotations/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
package annotations_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
jc "github.com/juju/testing/checkers"
98
"github.com/kr/pretty"
9+
"go.uber.org/mock/gomock"
1010
gc "gopkg.in/check.v1"
1111

1212
basemocks "github.com/juju/juju/api/base/mocks"

api/client/application/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
stderrors "errors"
88
"time"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/juju/charm/v11"
1211
"github.com/juju/errors"
1312
"github.com/juju/names/v4"
1413
jc "github.com/juju/testing/checkers"
14+
"go.uber.org/mock/gomock"
1515
gc "gopkg.in/check.v1"
1616

1717
"github.com/juju/juju/api/base/mocks"

api/client/applicationoffers/access_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
package applicationoffers_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
"github.com/juju/names/v4"
98
jc "github.com/juju/testing/checkers"
9+
"go.uber.org/mock/gomock"
1010
gc "gopkg.in/check.v1"
1111

1212
basemocks "github.com/juju/juju/api/base/mocks"

api/client/applicationoffers/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88
"time"
99

1010
"github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery"
11-
"github.com/golang/mock/gomock"
1211
"github.com/juju/charm/v11"
1312
"github.com/juju/errors"
1413
"github.com/juju/names/v4"
1514
jc "github.com/juju/testing/checkers"
15+
"go.uber.org/mock/gomock"
1616
gc "gopkg.in/check.v1"
1717

1818
basemocks "github.com/juju/juju/api/base/mocks"

api/client/backups/base_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package backups
66
import (
77
"time"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/juju/testing"
10+
"go.uber.org/mock/gomock"
1111
gc "gopkg.in/check.v1"
1212

1313
"github.com/juju/juju/api/base/mocks"

api/client/backups/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package backups
55

66
import (
7-
"github.com/golang/mock/gomock"
87
jc "github.com/juju/testing/checkers"
8+
"go.uber.org/mock/gomock"
99
gc "gopkg.in/check.v1"
1010

1111
apiserverbackups "github.com/juju/juju/apiserver/facades/client/backups"

api/client/block/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package block_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
"github.com/juju/errors"
8+
"go.uber.org/mock/gomock"
99
gc "gopkg.in/check.v1"
1010

1111
basemocks "github.com/juju/juju/api/base/mocks"

api/client/bundle/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package bundle_test
55

66
import (
7-
"github.com/golang/mock/gomock"
87
jc "github.com/juju/testing/checkers"
8+
"go.uber.org/mock/gomock"
99
gc "gopkg.in/check.v1"
1010

1111
basemocks "github.com/juju/juju/api/base/mocks"

api/client/charms/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"os"
1212
"strings"
1313

14-
"github.com/golang/mock/gomock"
1514
"github.com/juju/charm/v11"
1615
charmresource "github.com/juju/charm/v11/resource"
1716
"github.com/juju/errors"
1817
jc "github.com/juju/testing/checkers"
1918
"github.com/juju/version/v2"
19+
"go.uber.org/mock/gomock"
2020
gc "gopkg.in/check.v1"
2121
"gopkg.in/httprequest.v1"
2222

api/client/charms/downloader_s3_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package charms_test
66
import (
77
"net/url"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/juju/names/v4"
10+
"go.uber.org/mock/gomock"
1111
gc "gopkg.in/check.v1"
1212

1313
basemocks "github.com/juju/juju/api/base/mocks"

api/client/charms/downloader_test.go

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

12-
"github.com/golang/mock/gomock"
1312
"github.com/juju/charm/v11"
1413
jc "github.com/juju/testing/checkers"
14+
"go.uber.org/mock/gomock"
1515
gc "gopkg.in/check.v1"
1616
"gopkg.in/httprequest.v1"
1717

api/client/charms/mocks/s3caller_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.

api/client/charms/package_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
gc "gopkg.in/check.v1"
1010
)
1111

12-
//go:generate go run github.com/golang/mock/mockgen -package mocks -destination mocks/s3caller_mock.go github.com/juju/juju/worker/s3caller Session
12+
//go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/s3caller_mock.go github.com/juju/juju/worker/s3caller Session
1313

1414
func TestAll(t *testing.T) {
1515
gc.TestingT(t)

api/client/client/client_test.go

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

14-
"github.com/golang/mock/gomock"
1514
"github.com/gorilla/websocket"
1615
"github.com/juju/errors"
1716
"github.com/juju/testing"
1817
jc "github.com/juju/testing/checkers"
18+
"go.uber.org/mock/gomock"
1919
gc "gopkg.in/check.v1"
2020

2121
"github.com/juju/juju/api"

0 commit comments

Comments
 (0)